Merge branch '5.1.x'

This commit is contained in:
Rossen Stoyanchev
2019-04-16 21:08:54 -04:00
15 changed files with 112 additions and 141 deletions

View File

@@ -135,8 +135,7 @@ public class ModelAttributeMethodArgumentResolver extends HandlerMethodArgumentR
BindingResult errors = binder.getBindingResult();
if (adapter != null) {
return adapter.fromPublisher(errors.hasErrors() ?
Mono.error(new WebExchangeBindException(parameter, errors)) :
valueMono);
Mono.error(new WebExchangeBindException(parameter, errors)) : valueMono);
}
else {
if (errors.hasErrors() && !hasErrorsArgument(parameter)) {

View File

@@ -17,7 +17,6 @@ package org.springframework.web.reactive.result.view;
import java.util.function.Supplier;
import io.netty.buffer.PooledByteBufAllocator;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscription;
import reactor.core.publisher.BaseSubscriber;
@@ -26,7 +25,6 @@ import reactor.core.publisher.Mono;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.core.io.buffer.LeakAwareDataBufferFactory;
import org.springframework.core.io.buffer.NettyDataBufferFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseCookie;
@@ -47,8 +45,7 @@ public class ZeroDemandResponse implements ServerHttpResponse {
public ZeroDemandResponse() {
NettyDataBufferFactory delegate = new NettyDataBufferFactory(PooledByteBufAllocator.DEFAULT);
this.bufferFactory = new LeakAwareDataBufferFactory(delegate);
this.bufferFactory = new LeakAwareDataBufferFactory();
}