Add missing @Nullable annotations on parameters
Issue: SPR-15540
This commit is contained in:
@@ -31,6 +31,7 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.reactive.result.view.View;
|
||||
import org.springframework.web.reactive.result.view.ViewResolver;
|
||||
@@ -141,7 +142,7 @@ public class RenderingResponseIntegrationTests extends AbstractRouterFunctionInt
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> render(Map<String, ?> model, MediaType contentType,
|
||||
public Mono<Void> render(@Nullable Map<String, ?> model, @Nullable MediaType contentType,
|
||||
ServerWebExchange exchange) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("name=").append(this.name).append('\n');
|
||||
|
||||
@@ -45,6 +45,7 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.codec.DecoderHttpMessageReader;
|
||||
import org.springframework.http.codec.HttpMessageReader;
|
||||
import org.springframework.http.codec.json.Jackson2JsonDecoder;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.validation.Errors;
|
||||
import org.springframework.validation.Validator;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -401,7 +402,7 @@ public class MessageReaderArgumentResolverTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate(Object target, Errors errors) {
|
||||
public void validate(@Nullable Object target, Errors errors) {
|
||||
TestBean testBean = (TestBean) target;
|
||||
if (testBean.getFoo() == null) {
|
||||
errors.rejectValue("foo", "nullValue");
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.springframework.core.io.buffer.support.DataBufferTestUtils;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse;
|
||||
import org.springframework.mock.http.server.reactive.test.MockServerWebExchange;
|
||||
import org.springframework.ui.ConcurrentModel;
|
||||
@@ -389,7 +390,7 @@ public class ViewResolutionResultHandlerTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> render(Map<String, ?> model, MediaType mediaType, ServerWebExchange exchange) {
|
||||
public Mono<Void> render(@Nullable Map<String, ?> model, @Nullable MediaType mediaType, ServerWebExchange exchange) {
|
||||
ServerHttpResponse response = exchange.getResponse();
|
||||
if (mediaType != null) {
|
||||
response.getHeaders().setContentType(mediaType);
|
||||
|
||||
@@ -28,6 +28,7 @@ import rx.RxReactiveStreams;
|
||||
import org.springframework.core.io.buffer.NettyDataBufferFactory;
|
||||
import org.springframework.http.server.reactive.RxNettyServerHttpResponse;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.web.reactive.socket.HandshakeInfo;
|
||||
import org.springframework.web.reactive.socket.WebSocketHandler;
|
||||
import org.springframework.web.reactive.socket.adapter.RxNettyWebSocketSession;
|
||||
@@ -44,7 +45,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
public class RxNettyRequestUpgradeStrategy implements RequestUpgradeStrategy {
|
||||
|
||||
@Override
|
||||
public Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler handler, String subProtocol) {
|
||||
public Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler handler, @Nullable String subProtocol) {
|
||||
RxNettyServerHttpResponse response = (RxNettyServerHttpResponse) exchange.getResponse();
|
||||
HttpServerResponse<?> rxNettyResponse = response.getRxNettyResponse();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user