Adapt to MockClientHttpResponse no longer accepting a null body

pull/6234/merge
Andy Wilkinson 8 years ago
parent b5f0701356
commit 776933a1be

@ -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