Add more @Nullable parameters based on null usage
Issue: SPR-15540
This commit is contained in:
@@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.web.util.WebUtils;
|
||||
|
||||
@@ -91,7 +92,7 @@ public class MockAsyncContext implements AsyncContext {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatch(ServletContext context, String path) {
|
||||
public void dispatch(@Nullable ServletContext context, String path) {
|
||||
this.dispatchedPath = path;
|
||||
for (Runnable r : this.dispatchHandlers) {
|
||||
r.run();
|
||||
|
||||
@@ -873,7 +873,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncContext startAsync(ServletRequest request, ServletResponse response) {
|
||||
public AsyncContext startAsync(ServletRequest request, @Nullable ServletResponse response) {
|
||||
Assert.state(this.asyncSupported, "Async not supported");
|
||||
this.asyncStarted = true;
|
||||
this.asyncContext = new MockAsyncContext(request, response);
|
||||
@@ -1088,7 +1088,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
return this.method;
|
||||
}
|
||||
|
||||
public void setPathInfo(String pathInfo) {
|
||||
public void setPathInfo(@Nullable String pathInfo) {
|
||||
this.pathInfo = pathInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ class StubWebApplicationContext implements WebApplicationContext {
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, @Nullable Object args[], String defaultMessage, Locale locale) {
|
||||
public String getMessage(String code, @Nullable Object args[], @Nullable String defaultMessage, Locale locale) {
|
||||
return this.messageSource.getMessage(code, args, defaultMessage, locale);
|
||||
}
|
||||
|
||||
@@ -400,13 +400,13 @@ class StubWebApplicationContext implements WebApplicationContext {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object resolveDependency(DependencyDescriptor descriptor, String requestingBeanName) {
|
||||
public Object resolveDependency(DependencyDescriptor descriptor, @Nullable String requestingBeanName) {
|
||||
throw new UnsupportedOperationException("Dependency resolution not supported");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object resolveDependency(DependencyDescriptor descriptor, String requestingBeanName,
|
||||
Set<String> autowiredBeanNames, TypeConverter typeConverter) {
|
||||
@Nullable Set<String> autowiredBeanNames, @Nullable TypeConverter typeConverter) {
|
||||
throw new UnsupportedOperationException("Dependency resolution not supported");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user