Skip to content

Commit 759013e

Browse files
committed
Consistent isEmpty check in WebTestClient
Issue: SPR-17522
1 parent a55ca56 commit 759013e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ private static class DefaultBodyContentSpec implements BodyContentSpec {
479479

480480
DefaultBodyContentSpec(EntityExchangeResult<byte[]> result) {
481481
this.result = result;
482-
this.isEmpty = (result.getResponseBody() == null);
482+
this.isEmpty = (result.getResponseBody() == null || result.getResponseBody().length == 0);
483483
}
484484

485485
@Override

0 commit comments

Comments
 (0)