Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebTestClient.BodySpec.isEmpty() returns false on byte[0] [SPR-17522] #22054

Closed
spring-issuemaster opened this Issue Nov 20, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented Nov 20, 2018

mowol opened SPR-17522 and commented

WebTestClient.BodySpec.isEmpty() returns false on a Mono.empty().

In debug-view the responseBody is a MonoProcessor with a value of byte[0].

 

Interestingly enough, WebTestClient.BodySpec.getBodyAsString() has the following code:

if (body == null || body.length == 0) {		
   return "";		
}

where a byte[0] would be considered empty.


Affects: 5.0.9

Referenced from: commits 759013e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.