Make the signature of RHOM#writeAndFlush() more flexible
This modifies the signature of ReactiveHttpOutputMessage#writeAndFlush(...) in order to be able to use Flux<Flux<DataBuffer>> objects as arguments of this method. Issue: SPR-14952
This commit is contained in:
committed by
Sebastien Deleuze
parent
a143b57d4b
commit
a98be035a3
@@ -52,7 +52,7 @@ public class MockServerHttpResponse implements ServerHttpResponse {
|
||||
|
||||
private Publisher<DataBuffer> body;
|
||||
|
||||
private Publisher<Publisher<DataBuffer>> bodyWithFlushes;
|
||||
private Publisher<? extends Publisher<DataBuffer>> bodyWithFlushes;
|
||||
|
||||
private DataBufferFactory bufferFactory = new DefaultDataBufferFactory();
|
||||
|
||||
@@ -81,7 +81,7 @@ public class MockServerHttpResponse implements ServerHttpResponse {
|
||||
return this.body;
|
||||
}
|
||||
|
||||
public Publisher<Publisher<DataBuffer>> getBodyWithFlush() {
|
||||
public Publisher<? extends Publisher<DataBuffer>> getBodyWithFlush() {
|
||||
return this.bodyWithFlushes;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class MockServerHttpResponse implements ServerHttpResponse {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> writeAndFlushWith(Publisher<Publisher<DataBuffer>> body) {
|
||||
public Mono<Void> writeAndFlushWith(Publisher<? extends Publisher<DataBuffer>> body) {
|
||||
this.bodyWithFlushes = body;
|
||||
return Flux.from(this.bodyWithFlushes).then();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user