Skip to content

Commit 4b68227

Browse files
committed
Clean up warnings in spring-test
1 parent 5b90185 commit 4b68227

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ public void forward() throws IOException {
8585
}
8686

8787
@Test(expected = IllegalArgumentException.class)
88+
@SuppressWarnings("resource")
8889
public void contextPathDoesNotStartWithSlash() throws IOException {
8990
new MockMvcWebConnection(this.mockMvc, "context");
9091
}
9192

9293
@Test(expected = IllegalArgumentException.class)
94+
@SuppressWarnings("resource")
9395
public void contextPathEndsWithSlash() throws IOException {
9496
new MockMvcWebConnection(this.mockMvc, "/context/");
9597
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public void callableInterceptor() throws Exception {
101101

102102
@Configuration
103103
@EnableWebMvc
104-
@SuppressWarnings("unused")
105104
static class WebConfig extends WebMvcConfigurerAdapter {
106105

107106
@Override
@@ -122,7 +121,6 @@ public AsyncController asyncController() {
122121
}
123122

124123
@RestController
125-
@SuppressWarnings("unused")
126124
static class AsyncController {
127125

128126
@RequestMapping(path = "/callable")

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ public PersonDao personDao() {
143143

144144
@Configuration
145145
@EnableWebMvc
146-
@SuppressWarnings("unused")
147146
static class WebConfig extends WebMvcConfigurerAdapter {
148147

149148
@Autowired

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.springframework.http.converter.json.SpringHandlerInstantiator;
2929
import org.springframework.mock.web.test.MockHttpServletRequest;
3030
import org.springframework.stereotype.Controller;
31-
import org.springframework.web.bind.annotation.PathVariable;
3231
import org.springframework.web.bind.annotation.RequestMapping;
3332
import org.springframework.web.context.WebApplicationContext;
3433
import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -138,7 +137,6 @@ public void springHandlerInstantiator() {
138137

139138

140139
@Controller
141-
@SuppressWarnings("unused")
142140
private static class PlaceholderController {
143141

144142
@RequestMapping(value = "${sys.login.ajax}")
@@ -162,7 +160,6 @@ protected WebApplicationContext initWebAppContext() {
162160
}
163161

164162
@Controller
165-
@SuppressWarnings("unused")
166163
private static class PersonController {
167164

168165
@RequestMapping(value="/persons")

0 commit comments

Comments
 (0)