Add missing @Nullable annotations on parameters

Issue: SPR-15540
This commit is contained in:
Sebastien Deleuze
2017-05-31 12:37:54 +02:00
parent ad2c0f8410
commit b47d713e14
380 changed files with 1085 additions and 732 deletions

View File

@@ -39,6 +39,7 @@ import org.springframework.http.MockHttpInputMessage;
import org.springframework.http.MockHttpOutputMessage;
import org.springframework.http.converter.HttpMessageConversionException;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.lang.Nullable;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.endsWith;
@@ -169,7 +170,7 @@ public class MappingJackson2HttpMessageConverterTests {
public void readGenerics() throws IOException {
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter() {
@Override
protected JavaType getJavaType(Type type, Class<?> contextClass) {
protected JavaType getJavaType(Type type, @Nullable Class<?> contextClass) {
if (type instanceof Class && List.class.isAssignableFrom((Class<?>)type)) {
return new ObjectMapper().getTypeFactory().constructCollectionType(ArrayList.class, MyBean.class);
}

View File

@@ -23,6 +23,7 @@ import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.support.StaticListableBeanFactory;
import org.springframework.lang.Nullable;
import static org.junit.Assert.*;
@@ -91,7 +92,7 @@ public class DelegatingNavigationHandlerTests {
@Override
public void handleNavigation(
FacesContext facesContext, String fromAction, String outcome, NavigationHandler originalNavigationHandler) {
FacesContext facesContext, @Nullable String fromAction, @Nullable String outcome, @Nullable NavigationHandler originalNavigationHandler) {
lastFromAction = fromAction;
lastOutcome = outcome;
if (originalNavigationHandler != null) {