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-projects-issues opened this issue Nov 20, 2018 · 0 comments
Closed
Assignees
Labels
in: test type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues 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
Labels
in: test type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants