Clean up warnings in spring-test

This commit is contained in:
Sam Brannen
2015-11-14 22:57:33 +01:00
parent 5b901852e6
commit 4b682275c9
4 changed files with 2 additions and 6 deletions

View File

@@ -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/");
}

View File

@@ -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")

View File

@@ -143,7 +143,6 @@ public class JavaConfigTests {
@Configuration
@EnableWebMvc
@SuppressWarnings("unused")
static class WebConfig extends WebMvcConfigurerAdapter {
@Autowired

View File

@@ -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")