Browse Source

Consistent isEmpty check in WebTestClient

Issue: SPR-17522
pull/2023/head
Rossen Stoyanchev 6 years ago
parent
commit
759013eb17
  1. 2
      spring-test/src/main/java/org/springframework/test/web/reactive/server/DefaultWebTestClient.java

2
spring-test/src/main/java/org/springframework/test/web/reactive/server/DefaultWebTestClient.java

@ -479,7 +479,7 @@ class DefaultWebTestClient implements WebTestClient {
DefaultBodyContentSpec(EntityExchangeResult<byte[]> result) { DefaultBodyContentSpec(EntityExchangeResult<byte[]> result) {
this.result = result; this.result = result;
this.isEmpty = (result.getResponseBody() == null); this.isEmpty = (result.getResponseBody() == null || result.getResponseBody().length == 0);
} }
@Override @Override

Loading…
Cancel
Save