Browse Source

Clean up warnings in spring-test

pull/921/head
Sam Brannen 10 years ago
parent
commit
4b682275c9
  1. 2
      spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebConnectionTests.java
  2. 2
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/context/AsyncControllerJavaConfigTests.java
  3. 1
      spring-test/src/test/java/org/springframework/test/web/servlet/samples/context/JavaConfigTests.java
  4. 3
      spring-test/src/test/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilderTests.java

2
spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebConnectionTests.java

@ -85,11 +85,13 @@ public class MockMvcWebConnectionTests { @@ -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/");
}

2
spring-test/src/test/java/org/springframework/test/web/servlet/samples/context/AsyncControllerJavaConfigTests.java

@ -101,7 +101,6 @@ public class AsyncControllerJavaConfigTests { @@ -101,7 +101,6 @@ public class AsyncControllerJavaConfigTests {
@Configuration
@EnableWebMvc
@SuppressWarnings("unused")
static class WebConfig extends WebMvcConfigurerAdapter {
@Override
@ -122,7 +121,6 @@ public class AsyncControllerJavaConfigTests { @@ -122,7 +121,6 @@ public class AsyncControllerJavaConfigTests {
}
@RestController
@SuppressWarnings("unused")
static class AsyncController {
@RequestMapping(path = "/callable")

1
spring-test/src/test/java/org/springframework/test/web/servlet/samples/context/JavaConfigTests.java

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

3
spring-test/src/test/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilderTests.java

@ -28,7 +28,6 @@ import org.junit.Test; @@ -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 { @@ -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 { @@ -162,7 +160,6 @@ public class StandaloneMockMvcBuilderTests {
}
@Controller
@SuppressWarnings("unused")
private static class PersonController {
@RequestMapping(value="/persons")

Loading…
Cancel
Save