Browse Source

Adapt to MockClientHttpResponse no longer accepting a null body

pull/6234/merge
Andy Wilkinson 9 years ago
parent
commit
776933a1be
  1. 4
      spring-boot-devtools/src/test/java/org/springframework/boot/devtools/test/MockClientHttpRequestFactory.java

4
spring-boot-devtools/src/test/java/org/springframework/boot/devtools/test/MockClientHttpRequestFactory.java

@ -118,8 +118,8 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory { @@ -118,8 +118,8 @@ public class MockClientHttpRequestFactory implements ClientHttpRequestFactory {
}
public ClientHttpResponse asHttpResponse(AtomicLong seq) {
MockClientHttpResponse httpResponse = new MockClientHttpResponse(this.payload,
this.status);
MockClientHttpResponse httpResponse = new MockClientHttpResponse(
this.payload == null ? new byte[0] : this.payload, this.status);
waitForDelay();
if (this.payload != null) {
httpResponse.getHeaders().setContentLength(this.payload.length);

Loading…
Cancel
Save