Clean up warnings and delete dead code

This commit is contained in:
Sam Brannen
2018-08-12 15:54:38 +02:00
parent c4a7567a5e
commit cfb1ed1009
25 changed files with 25 additions and 61 deletions

View File

@@ -85,6 +85,7 @@ public class XmlWebApplicationContextTests extends AbstractApplicationContextTes
}
@Test
@SuppressWarnings("deprecation")
public void environmentMerge() {
assertThat(this.root.getEnvironment().acceptsProfiles("rootProfile1"), is(true));
assertThat(this.root.getEnvironment().acceptsProfiles("wacProfile1"), is(false));

View File

@@ -265,26 +265,6 @@ public class RequestMappingHandlerAdapterTests {
assertEquals(handlerCount, this.handlerAdapter.getReturnValueHandlers().size());
}
private void testJsonp(String value, boolean validValue) throws Exception {
this.request = new MockHttpServletRequest("GET", "/");
this.request.addHeader("Accept", MediaType.APPLICATION_JSON_VALUE);
this.request.setParameter("c", value);
this.response = new MockHttpServletResponse();
HandlerMethod handlerMethod = handlerMethod(new SimpleController(), "handleWithResponseEntity");
this.handlerAdapter.afterPropertiesSet();
this.handlerAdapter.handle(this.request, this.response, handlerMethod);
assertEquals(200, this.response.getStatus());
if (validValue) {
assertEquals("/**/" + value + "({\"foo\":\"bar\"});", this.response.getContentAsString());
}
else {
assertEquals("{\"foo\":\"bar\"}", this.response.getContentAsString());
}
}
@SuppressWarnings("unused")
private static class SimpleController {

View File

@@ -936,6 +936,7 @@ public class RequestResponseBodyMethodProcessorTests {
@RequestMapping
@ResponseBody
@SuppressWarnings("unchecked")
public List<T> handleTypeInfoList() {
List<T> list = new ArrayList<>();
list.add((T) new Foo("foo"));