Clean up warnings and delete dead code
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user