Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. Issue: SPR-15792
This commit is contained in:
@@ -285,7 +285,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
|
||||
* Set the name of the ServletContext attribute which should be used to retrieve the
|
||||
* {@link WebApplicationContext} that this servlet is supposed to use.
|
||||
*/
|
||||
public void setContextAttribute(String contextAttribute) {
|
||||
public void setContextAttribute(@Nullable String contextAttribute) {
|
||||
this.contextAttribute = contextAttribute;
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
|
||||
* Specify a custom WebApplicationContext id,
|
||||
* to be used as serialization id for the underlying BeanFactory.
|
||||
*/
|
||||
public void setContextId(String contextId) {
|
||||
public void setContextId(@Nullable String contextId) {
|
||||
this.contextId = contextId;
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
|
||||
* location built from the namespace. This location string can consist of
|
||||
* multiple locations separated by any number of commas and spaces.
|
||||
*/
|
||||
public void setContextConfigLocation(String contextConfigLocation) {
|
||||
public void setContextConfigLocation(@Nullable String contextConfigLocation) {
|
||||
this.contextConfigLocation = contextConfigLocation;
|
||||
}
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ public class ModelAndView {
|
||||
* <p>The response status is set just prior to View rendering.
|
||||
* @since 4.3
|
||||
*/
|
||||
public void setStatus(HttpStatus status) {
|
||||
public void setStatus(@Nullable HttpStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
* Set the Spring {@link ApplicationContext}, e.g. for resource loading.
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) {
|
||||
public void setApplicationContext(@Nullable ApplicationContext applicationContext) {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
* looking up file extensions, etc.
|
||||
*/
|
||||
@Override
|
||||
public void setServletContext(ServletContext servletContext) {
|
||||
public void setServletContext(@Nullable ServletContext servletContext) {
|
||||
this.servletContext = servletContext;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||
* This handler will be returned if no specific mapping was found.
|
||||
* <p>Default is {@code null}, indicating no default handler.
|
||||
*/
|
||||
public void setDefaultHandler(Object defaultHandler) {
|
||||
public void setDefaultHandler(@Nullable Object defaultHandler) {
|
||||
this.defaultHandler = defaultHandler;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ import org.springframework.web.servlet.HandlerExecutionChain;
|
||||
*/
|
||||
public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping implements MatchableHandlerMapping {
|
||||
|
||||
@Nullable
|
||||
private Object rootHandler;
|
||||
|
||||
private boolean useTrailingSlashMatch = false;
|
||||
@@ -68,7 +69,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping i
|
||||
* the handler to be registered for the root path ("/").
|
||||
* <p>Default is {@code null}, indicating no root handler.
|
||||
*/
|
||||
public void setRootHandler(Object rootHandler) {
|
||||
public void setRootHandler(@Nullable Object rootHandler) {
|
||||
this.rootHandler = rootHandler;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public final class MappedInterceptor implements HandlerInterceptor {
|
||||
* PathMatcher implementations that support mapping metadata other than the
|
||||
* Ant-style path patterns supported by default.
|
||||
*/
|
||||
public void setPathMatcher(PathMatcher pathMatcher) {
|
||||
public void setPathMatcher(@Nullable PathMatcher pathMatcher) {
|
||||
this.pathMatcher = pathMatcher;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,13 +39,14 @@ import org.springframework.web.servlet.LocaleContextResolver;
|
||||
*/
|
||||
public abstract class AbstractLocaleContextResolver extends AbstractLocaleResolver implements LocaleContextResolver {
|
||||
|
||||
@Nullable
|
||||
private TimeZone defaultTimeZone;
|
||||
|
||||
|
||||
/**
|
||||
* Set a default TimeZone that this resolver will return if no other time zone found.
|
||||
*/
|
||||
public void setDefaultTimeZone(TimeZone defaultTimeZone) {
|
||||
public void setDefaultTimeZone(@Nullable TimeZone defaultTimeZone) {
|
||||
this.defaultTimeZone = defaultTimeZone;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,13 +31,14 @@ import org.springframework.web.servlet.LocaleResolver;
|
||||
*/
|
||||
public abstract class AbstractLocaleResolver implements LocaleResolver {
|
||||
|
||||
@Nullable
|
||||
private Locale defaultLocale;
|
||||
|
||||
|
||||
/**
|
||||
* Set a default Locale that this resolver will return if no other locale found.
|
||||
*/
|
||||
public void setDefaultLocale(Locale defaultLocale) {
|
||||
public void setDefaultLocale(@Nullable Locale defaultLocale) {
|
||||
this.defaultLocale = defaultLocale;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ public class AcceptHeaderLocaleResolver implements LocaleResolver {
|
||||
|
||||
private final List<Locale> supportedLocales = new ArrayList<>(4);
|
||||
|
||||
@Nullable
|
||||
private Locale defaultLocale;
|
||||
|
||||
|
||||
@@ -77,7 +78,7 @@ public class AcceptHeaderLocaleResolver implements LocaleResolver {
|
||||
* @param defaultLocale the default locale to use
|
||||
* @since 4.3
|
||||
*/
|
||||
public void setDefaultLocale(Locale defaultLocale) {
|
||||
public void setDefaultLocale(@Nullable Locale defaultLocale) {
|
||||
this.defaultLocale = defaultLocale;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ public class CookieLocaleResolver extends CookieGenerator implements LocaleConte
|
||||
/**
|
||||
* Set a fixed Locale that this resolver will return if no cookie found.
|
||||
*/
|
||||
public void setDefaultLocale(Locale defaultLocale) {
|
||||
public void setDefaultLocale(@Nullable Locale defaultLocale) {
|
||||
this.defaultLocale = defaultLocale;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class CookieLocaleResolver extends CookieGenerator implements LocaleConte
|
||||
* Set a fixed TimeZone that this resolver will return if no cookie found.
|
||||
* @since 4.0
|
||||
*/
|
||||
public void setDefaultTimeZone(TimeZone defaultTimeZone) {
|
||||
public void setDefaultTimeZone(@Nullable TimeZone defaultTimeZone) {
|
||||
this.defaultTimeZone = defaultTimeZone;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,10 @@ import org.springframework.web.servlet.support.RequestContextUtils;
|
||||
*/
|
||||
public class ParameterizableViewController extends AbstractController {
|
||||
|
||||
@Nullable
|
||||
private Object view;
|
||||
|
||||
@Nullable
|
||||
private HttpStatus statusCode;
|
||||
|
||||
private boolean statusOnly;
|
||||
@@ -55,7 +57,7 @@ public class ParameterizableViewController extends AbstractController {
|
||||
* DispatcherServlet via a ViewResolver. Will override any pre-existing
|
||||
* view name or View.
|
||||
*/
|
||||
public void setViewName(String viewName) {
|
||||
public void setViewName(@Nullable String viewName) {
|
||||
this.view = viewName;
|
||||
}
|
||||
|
||||
@@ -98,7 +100,7 @@ public class ParameterizableViewController extends AbstractController {
|
||||
* fully handled within the controller.
|
||||
* @since 4.1
|
||||
*/
|
||||
public void setStatusCode(HttpStatus statusCode) {
|
||||
public void setStatusCode(@Nullable HttpStatus statusCode) {
|
||||
this.statusCode = statusCode;
|
||||
}
|
||||
|
||||
|
||||
@@ -534,7 +534,7 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
|
||||
* <p>By default this is not set.
|
||||
* @since 4.2.8
|
||||
*/
|
||||
public void setUrlPathHelper(UrlPathHelper urlPathHelper) {
|
||||
public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) {
|
||||
this.urlPathHelper = urlPathHelper;
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
|
||||
* Set a custom PathMatcher to use for the PatternsRequestCondition.
|
||||
* <p>By default this is not set.
|
||||
*/
|
||||
public void setPathMatcher(PathMatcher pathMatcher) {
|
||||
public void setPathMatcher(@Nullable PathMatcher pathMatcher) {
|
||||
this.pathMatcher = pathMatcher;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce
|
||||
* after built-in ones. To override the built-in support for argument
|
||||
* resolution use {@link #setArgumentResolvers} instead.
|
||||
*/
|
||||
public void setCustomArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
|
||||
public void setCustomArgumentResolvers(@Nullable List<HandlerMethodArgumentResolver> argumentResolvers) {
|
||||
this.customArgumentResolvers= argumentResolvers;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce
|
||||
* ordered after built-in ones. To override the built-in support for
|
||||
* return value handling use {@link #setReturnValueHandlers}.
|
||||
*/
|
||||
public void setCustomReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) {
|
||||
public void setCustomReturnValueHandlers(@Nullable List<HandlerMethodReturnValueHandler> returnValueHandlers) {
|
||||
this.customReturnValueHandlers = returnValueHandlers;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) {
|
||||
public void setApplicationContext(@Nullable ApplicationContext applicationContext) {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.springframework.web.servlet.View;
|
||||
*/
|
||||
public class ModelAndViewMethodReturnValueHandler implements HandlerMethodReturnValueHandler {
|
||||
|
||||
@Nullable
|
||||
private String[] redirectPatterns;
|
||||
|
||||
|
||||
@@ -56,7 +57,7 @@ public class ModelAndViewMethodReturnValueHandler implements HandlerMethodReturn
|
||||
* prefix as well.
|
||||
* @since 4.1
|
||||
*/
|
||||
public void setRedirectPatterns(String... redirectPatterns) {
|
||||
public void setRedirectPatterns(@Nullable String... redirectPatterns) {
|
||||
this.redirectPatterns = redirectPatterns;
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
* after built-in ones. To override the built-in support for argument
|
||||
* resolution use {@link #setArgumentResolvers} instead.
|
||||
*/
|
||||
public void setCustomArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
|
||||
public void setCustomArgumentResolvers(@Nullable List<HandlerMethodArgumentResolver> argumentResolvers) {
|
||||
this.customArgumentResolvers = argumentResolvers;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
* ordered after built-in ones. To override the built-in support for
|
||||
* return value handling use {@link #setReturnValueHandlers}.
|
||||
*/
|
||||
public void setCustomReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) {
|
||||
public void setCustomReturnValueHandlers(@Nullable List<HandlerMethodReturnValueHandler> returnValueHandlers) {
|
||||
this.customReturnValueHandlers = returnValueHandlers;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
* the return type and controller method information and can be ordered
|
||||
* freely relative to other return value handlers.
|
||||
*/
|
||||
public void setModelAndViewResolvers(List<ModelAndViewResolver> modelAndViewResolvers) {
|
||||
public void setModelAndViewResolvers(@Nullable List<ModelAndViewResolver> modelAndViewResolvers) {
|
||||
this.modelAndViewResolvers = modelAndViewResolvers;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
* Provide a WebBindingInitializer with "global" initialization to apply
|
||||
* to every DataBinder instance.
|
||||
*/
|
||||
public void setWebBindingInitializer(WebBindingInitializer webBindingInitializer) {
|
||||
public void setWebBindingInitializer(@Nullable WebBindingInitializer webBindingInitializer) {
|
||||
this.webBindingInitializer = webBindingInitializer;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.springframework.web.servlet.RequestToViewNameTranslator;
|
||||
*/
|
||||
public class ViewNameMethodReturnValueHandler implements HandlerMethodReturnValueHandler {
|
||||
|
||||
@Nullable
|
||||
private String[] redirectPatterns;
|
||||
|
||||
|
||||
@@ -56,7 +57,7 @@ public class ViewNameMethodReturnValueHandler implements HandlerMethodReturnValu
|
||||
* prefix as well.
|
||||
* @since 4.1
|
||||
*/
|
||||
public void setRedirectPatterns(String... redirectPatterns) {
|
||||
public void setRedirectPatterns(@Nullable String... redirectPatterns) {
|
||||
this.redirectPatterns = redirectPatterns;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.springframework.web.context.support.ServletContextResource;
|
||||
*/
|
||||
public class PathResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
@Nullable
|
||||
private Resource[] allowedLocations;
|
||||
|
||||
|
||||
@@ -63,7 +64,7 @@ public class PathResourceResolver extends AbstractResourceResolver {
|
||||
* @since 4.1.2
|
||||
* @see ResourceHttpRequestHandler#initAllowedLocations()
|
||||
*/
|
||||
public void setAllowedLocations(Resource... locations) {
|
||||
public void setAllowedLocations(@Nullable Resource... locations) {
|
||||
this.allowedLocations = locations;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
|
||||
* <p>By default a {@link ResourceHttpMessageConverter} will be configured.
|
||||
* @since 4.3
|
||||
*/
|
||||
public void setResourceHttpMessageConverter(ResourceHttpMessageConverter messageConverter) {
|
||||
public void setResourceHttpMessageConverter(@Nullable ResourceHttpMessageConverter messageConverter) {
|
||||
this.resourceHttpMessageConverter = messageConverter;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
|
||||
* <p>By default a {@link ResourceRegionHttpMessageConverter} will be configured.
|
||||
* @since 4.3
|
||||
*/
|
||||
public void setResourceRegionHttpMessageConverter(ResourceRegionHttpMessageConverter messageConverter) {
|
||||
public void setResourceRegionHttpMessageConverter(@Nullable ResourceRegionHttpMessageConverter messageConverter) {
|
||||
this.resourceRegionHttpMessageConverter = messageConverter;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
|
||||
* @param contentNegotiationManager the manager in use
|
||||
* @since 4.3
|
||||
*/
|
||||
public void setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) {
|
||||
public void setContentNegotiationManager(@Nullable ContentNegotiationManager contentNegotiationManager) {
|
||||
this.contentNegotiationManager = contentNegotiationManager;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class ResourceTransformerSupport implements ResourceTransformer
|
||||
* This is required only for links expressed as full paths and not for
|
||||
* relative links.
|
||||
*/
|
||||
public void setResourceUrlProvider(ResourceUrlProvider resourceUrlProvider) {
|
||||
public void setResourceUrlProvider(@Nullable ResourceUrlProvider resourceUrlProvider) {
|
||||
this.resourceUrlProvider = resourceUrlProvider;
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
|
||||
* <p>Default is GET, HEAD and POST for simple form controller types;
|
||||
* unrestricted for general controllers and interceptors.
|
||||
*/
|
||||
public final void setSupportedMethods(String... methods) {
|
||||
public final void setSupportedMethods(@Nullable String... methods) {
|
||||
if (!ObjectUtils.isEmpty(methods)) {
|
||||
this.supportedMethods = new LinkedHashSet<>(Arrays.asList(methods));
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
|
||||
* the Cache-Control HTTP response header.
|
||||
* @since 4.2
|
||||
*/
|
||||
public final void setCacheControl(CacheControl cacheControl) {
|
||||
public final void setCacheControl(@Nullable CacheControl cacheControl) {
|
||||
this.cacheControl = cacheControl;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
|
||||
* @param varyByRequestHeaders one or more request header names
|
||||
* @since 4.3
|
||||
*/
|
||||
public final void setVaryByRequestHeaders(String... varyByRequestHeaders) {
|
||||
public final void setVaryByRequestHeaders(@Nullable String... varyByRequestHeaders) {
|
||||
this.varyByRequestHeaders = varyByRequestHeaders;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Param {
|
||||
/**
|
||||
* Set the raw name of the parameter
|
||||
*/
|
||||
public void setName(String name) {
|
||||
public void setName(@Nullable String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public abstract class AbstractUrlBasedView extends AbstractView implements Initi
|
||||
* Set the URL of the resource that this view wraps.
|
||||
* The URL must be appropriate for the concrete View implementation.
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
public void setUrl(@Nullable String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
|
||||
|
||||
@Nullable
|
||||
private Set<String> exposedContextBeanNames;
|
||||
|
||||
@Nullable
|
||||
private String beanName;
|
||||
|
||||
@@ -278,7 +279,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
|
||||
* <p>Framework code must call this when constructing views.
|
||||
*/
|
||||
@Override
|
||||
public void setBeanName(String beanName) {
|
||||
public void setBeanName(@Nullable String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
|
||||
* applying a {@link org.springframework.web.accept.HeaderContentNegotiationStrategy}.
|
||||
* @see ContentNegotiationManager#ContentNegotiationManager()
|
||||
*/
|
||||
public void setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) {
|
||||
public void setContentNegotiationManager(@Nullable ContentNegotiationManager contentNegotiationManager) {
|
||||
this.contentNegotiationManager = contentNegotiationManager;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
|
||||
* @param hosts one or more application hosts
|
||||
* @since 4.3
|
||||
*/
|
||||
public void setHosts(String... hosts) {
|
||||
public void setHosts(@Nullable String... hosts) {
|
||||
this.hosts = hosts;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,8 +146,8 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
* (by default, AbstractUrlBasedView)
|
||||
* @see AbstractUrlBasedView
|
||||
*/
|
||||
public void setViewClass(Class<?> viewClass) {
|
||||
if (!requiredViewClass().isAssignableFrom(viewClass)) {
|
||||
public void setViewClass(@Nullable Class<?> viewClass) {
|
||||
if (viewClass != null && !requiredViewClass().isAssignableFrom(viewClass)) {
|
||||
throw new IllegalArgumentException("Given view class [" + viewClass.getName() +
|
||||
"] is not of type [" + requiredViewClass().getName() + "]");
|
||||
}
|
||||
@@ -204,7 +204,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
* <p>May be ignored by view classes if the view itself is assumed
|
||||
* to set the content type, e.g. in case of JSPs.
|
||||
*/
|
||||
public void setContentType(String contentType) {
|
||||
public void setContentType(@Nullable String contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
* @param redirectHosts one or more application hosts
|
||||
* @since 4.3
|
||||
*/
|
||||
public void setRedirectHosts(String... redirectHosts) {
|
||||
public void setRedirectHosts(@Nullable String... redirectHosts) {
|
||||
this.redirectHosts = redirectHosts;
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
* @param requestContextAttribute name of the RequestContext attribute
|
||||
* @see AbstractView#setRequestContextAttribute
|
||||
*/
|
||||
public void setRequestContextAttribute(String requestContextAttribute) {
|
||||
public void setRequestContextAttribute(@Nullable String requestContextAttribute) {
|
||||
this.requestContextAttribute = requestContextAttribute;
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
* attributes.
|
||||
* @see AbstractView#setExposedContextBeanNames
|
||||
*/
|
||||
public void setExposedContextBeanNames(String... exposedContextBeanNames) {
|
||||
public void setExposedContextBeanNames(@Nullable String... exposedContextBeanNames) {
|
||||
this.exposedContextBeanNames = exposedContextBeanNames;
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
* view name 'myReport'.
|
||||
* @see #canHandle
|
||||
*/
|
||||
public void setViewNames(String... viewNames) {
|
||||
public void setViewNames(@Nullable String... viewNames) {
|
||||
this.viewNames = viewNames;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ public class FreeMarkerView extends AbstractTemplateView {
|
||||
* <p>Specify the encoding in the FreeMarker Configuration rather than per
|
||||
* template if all your templates share a common encoding.
|
||||
*/
|
||||
public void setEncoding(String encoding) {
|
||||
public void setEncoding(@Nullable String encoding) {
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class FreeMarkerView extends AbstractTemplateView {
|
||||
* in terms of memory and initial CPU usage. In production it is recommended that you use
|
||||
* a {@link FreeMarkerConfig} which exposes a single shared {@link TaglibFactory}.
|
||||
*/
|
||||
public void setConfiguration(Configuration configuration) {
|
||||
public void setConfiguration(@Nullable Configuration configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ public class MappingJackson2JsonView extends AbstractJackson2View {
|
||||
* Set the attributes in the model that should be rendered by this view.
|
||||
* When set, all other model attributes will be ignored.
|
||||
*/
|
||||
public void setModelKeys(Set<String> modelKeys) {
|
||||
public void setModelKeys(@Nullable Set<String> modelKeys) {
|
||||
this.modelKeys = modelKeys;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user