Skip to content

Commit 6b616ba

Browse files
committed
Merge pull request spring-projects#1126 from kamilszymanski:expression-lambda
* pr/1126: Use abbreviated expression lambda instead of statement lambda
2 parents 0a5e577 + 4aea551 commit 6b616ba

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

spring-web/src/main/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,9 @@ protected Mono<Void> writeWithInternal(Publisher<DataBuffer> body) {
8282
protected Mono<Void> writeAndFlushWithInternal(
8383
Publisher<Publisher<DataBuffer>> body) {
8484
Flux<ByteBuf> bodyWithFlushSignals = Flux.from(body).
85-
flatMap(publisher -> {
86-
return Flux.from(publisher).
87-
map(NettyDataBufferFactory::toByteBuf).
88-
concatWith(Mono.just(FLUSH_SIGNAL));
89-
});
85+
flatMap(publisher -> Flux.from(publisher).
86+
map(NettyDataBufferFactory::toByteBuf).
87+
concatWith(Mono.just(FLUSH_SIGNAL)));
9088
Observable<ByteBuf> content = RxJava1Adapter.publisherToObservable(bodyWithFlushSignals);
9189
ResponseContentWriter<ByteBuf> writer = this.response.write(content, bb -> bb == FLUSH_SIGNAL);
9290
return RxJava1Adapter.observableToFlux(writer).then();

0 commit comments

Comments
 (0)