Clean up warnings and delete dead code
This commit is contained in:
@@ -23,9 +23,6 @@ import java.util.function.Consumer;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.ReactiveAdapterRegistry;
|
||||
import org.springframework.core.ResolvableType;
|
||||
@@ -60,9 +57,6 @@ import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
*/
|
||||
public class ResponseBodyEmitterReturnValueHandler implements HandlerMethodReturnValueHandler {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(ResponseBodyEmitterReturnValueHandler.class);
|
||||
|
||||
|
||||
private final List<HttpMessageConverter<?>> messageConverters;
|
||||
|
||||
private final ReactiveTypeHandler reactiveHandler;
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -13,4 +13,4 @@ fun ScriptTemplateWithBindings.i18n(code: String) =
|
||||
|
||||
var ScriptTemplateWithBindings.foo: String
|
||||
get() = bindings["foo"] as String
|
||||
set(value) { throw UnsupportedOperationException()}
|
||||
set(@Suppress("UNUSED_PARAMETER") value) { throw UnsupportedOperationException()}
|
||||
|
||||
Reference in New Issue
Block a user