Suppress warnings in tests

This commit is contained in:
Sam Brannen
2023-04-07 14:23:55 +02:00
parent c811428512
commit 01fabfe66d
5 changed files with 25 additions and 31 deletions

View File

@@ -375,7 +375,7 @@ class ServletAnnotationControllerHandlerMethodTests extends AbstractServletHandl
assertThat(response.getContentAsString()).isEmpty();
}
@SuppressWarnings("rawtypes")
@SuppressWarnings({ "rawtypes", "unchecked" })
@PathPatternsParameterizedTest
void sessionAttributeExposure(boolean usePathPatterns) throws Exception {
initDispatcherServlet(
@@ -405,7 +405,7 @@ class ServletAnnotationControllerHandlerMethodTests extends AbstractServletHandl
assertThat(((Map) session.getAttribute("model"))).containsKey("object2");
}
@SuppressWarnings("rawtypes")
@SuppressWarnings({ "rawtypes", "unchecked" })
@PathPatternsParameterizedTest
void sessionAttributeExposureWithInterface(boolean usePathPatterns) throws Exception {
initDispatcherServlet(MySessionAttributesControllerImpl.class, usePathPatterns, wac -> {
@@ -438,7 +438,7 @@ class ServletAnnotationControllerHandlerMethodTests extends AbstractServletHandl
assertThat(((Map) session.getAttribute("model"))).containsKey("object2");
}
@SuppressWarnings("rawtypes")
@SuppressWarnings({ "rawtypes", "unchecked" })
@PathPatternsParameterizedTest
void parameterizedAnnotatedInterface(boolean usePathPatterns) throws Exception {
initDispatcherServlet(
@@ -470,7 +470,7 @@ class ServletAnnotationControllerHandlerMethodTests extends AbstractServletHandl
assertThat(((Map) session.getAttribute("model"))).containsKey("testBeanList");
}
@SuppressWarnings("rawtypes")
@SuppressWarnings({ "rawtypes", "unchecked" })
@PathPatternsParameterizedTest
void parameterizedAnnotatedInterfaceWithOverriddenMappingsInImpl(boolean usePathPatterns) throws Exception {
initDispatcherServlet(