提交 4b682275 编写于 作者: S Sam Brannen

Clean up warnings in spring-test

上级 5b901852
......@@ -85,11 +85,13 @@ public class MockMvcWebConnectionTests {
}
@Test(expected = IllegalArgumentException.class)
@SuppressWarnings("resource")
public void contextPathDoesNotStartWithSlash() throws IOException {
new MockMvcWebConnection(this.mockMvc, "context");
}
@Test(expected = IllegalArgumentException.class)
@SuppressWarnings("resource")
public void contextPathEndsWithSlash() throws IOException {
new MockMvcWebConnection(this.mockMvc, "/context/");
}
......
......@@ -101,7 +101,6 @@ public class AsyncControllerJavaConfigTests {
@Configuration
@EnableWebMvc
@SuppressWarnings("unused")
static class WebConfig extends WebMvcConfigurerAdapter {
@Override
......@@ -122,7 +121,6 @@ public class AsyncControllerJavaConfigTests {
}
@RestController
@SuppressWarnings("unused")
static class AsyncController {
@RequestMapping(path = "/callable")
......
......@@ -143,7 +143,6 @@ public class JavaConfigTests {
@Configuration
@EnableWebMvc
@SuppressWarnings("unused")
static class WebConfig extends WebMvcConfigurerAdapter {
@Autowired
......
......@@ -28,7 +28,6 @@ import org.junit.Test;
import org.springframework.http.converter.json.SpringHandlerInstantiator;
import org.springframework.mock.web.test.MockHttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
......@@ -138,7 +137,6 @@ public class StandaloneMockMvcBuilderTests {
@Controller
@SuppressWarnings("unused")
private static class PlaceholderController {
@RequestMapping(value = "${sys.login.ajax}")
......@@ -162,7 +160,6 @@ public class StandaloneMockMvcBuilderTests {
}
@Controller
@SuppressWarnings("unused")
private static class PersonController {
@RequestMapping(value="/persons")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册