Add missing @Nullable annotations on parameters
Issue: SPR-15540
This commit is contained in:
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.config.CustomScopeConfigurer;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.converter.ByteArrayMessageConverter;
|
||||
@@ -540,5 +541,5 @@ class TestValidator implements Validator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate(Object target, Errors errors) { }
|
||||
public void validate(@Nullable Object target, Errors errors) { }
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.junit.Test;
|
||||
import org.junit.rules.TestName;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.converter.StringMessageConverter;
|
||||
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
||||
import org.springframework.messaging.simp.stomp.StompCommand;
|
||||
@@ -171,7 +172,7 @@ public class WebSocketStompClientIntegrationTests {
|
||||
return String.class;
|
||||
}
|
||||
@Override
|
||||
public void handleFrame(StompHeaders headers, Object payload) {
|
||||
public void handleFrame(StompHeaders headers, @Nullable Object payload) {
|
||||
received.add((String) payload);
|
||||
}
|
||||
});
|
||||
@@ -208,7 +209,7 @@ public class WebSocketStompClientIntegrationTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFrame(StompHeaders headers, Object payload) {
|
||||
public void handleFrame(StompHeaders headers, @Nullable Object payload) {
|
||||
logger.error("STOMP error frame " + headers + " payload=" + payload);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.messaging.simp.stomp.StompCommand;
|
||||
@@ -213,7 +214,7 @@ public class RestTemplateXhrTransportTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T execute(URI url, HttpMethod method, RequestCallback callback, ResponseExtractor<T> extractor) throws RestClientException {
|
||||
public <T> T execute(URI url, HttpMethod method, @Nullable RequestCallback callback, @Nullable ResponseExtractor<T> extractor) throws RestClientException {
|
||||
try {
|
||||
extractor.extractData(this.responses.remove());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user