Clean up warnings in spring-test
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user