Clean up warnings in spring-webmvc

This commit is contained in:
Sam Brannen
2014-03-28 13:34:43 +01:00
parent 75439c7836
commit db66ef0f6f
11 changed files with 36 additions and 69 deletions

View File

@@ -449,7 +449,6 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
return null;
}
@SuppressWarnings("deprecation")
private ManagedList<?> getMessageConverters(Element element, Object source, ParserContext parserContext) {
Element convertersElement = DomUtils.getChildElementByTagName(element, "message-converters");
ManagedList<? super Object> messageConverters = new ManagedList<Object>();

View File

@@ -538,7 +538,6 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
* Subclasses can call this method from {@link #configureMessageConverters(List)}.
* @param messageConverters the list to add the default message converters to
*/
@SuppressWarnings("deprecation")
protected final void addDefaultHttpMessageConverters(List<HttpMessageConverter<?>> messageConverters) {
StringHttpMessageConverter stringConverter = new StringHttpMessageConverter();
stringConverter.setWriteAcceptCharset(false);

View File

@@ -40,6 +40,7 @@ public class HttpHeadersReturnValueHandler implements HandlerMethodReturnValueHa
}
@Override
@SuppressWarnings("resource")
public void handleReturnValue(Object returnValue, MethodParameter returnType,
ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception {
@@ -55,4 +56,5 @@ public class HttpHeadersReturnValueHandler implements HandlerMethodReturnValueHa
outputMessage.getBody(); // flush headers
}
}
}

View File

@@ -30,7 +30,6 @@ import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.web.context.AbstractContextLoaderInitializer;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.filter.DelegatingFilterProxy;
import org.springframework.web.servlet.DispatcherServlet;
/**