File tree Expand file tree Collapse file tree 4 files changed +2
-6
lines changed
spring-test/src/test/java/org/springframework/test/web/servlet Expand file tree Collapse file tree 4 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,13 @@ public void forward() throws IOException {
85
85
}
86
86
87
87
@ Test (expected = IllegalArgumentException .class )
88
+ @ SuppressWarnings ("resource" )
88
89
public void contextPathDoesNotStartWithSlash () throws IOException {
89
90
new MockMvcWebConnection (this .mockMvc , "context" );
90
91
}
91
92
92
93
@ Test (expected = IllegalArgumentException .class )
94
+ @ SuppressWarnings ("resource" )
93
95
public void contextPathEndsWithSlash () throws IOException {
94
96
new MockMvcWebConnection (this .mockMvc , "/context/" );
95
97
}
Original file line number Diff line number Diff line change @@ -101,7 +101,6 @@ public void callableInterceptor() throws Exception {
101
101
102
102
@ Configuration
103
103
@ EnableWebMvc
104
- @ SuppressWarnings ("unused" )
105
104
static class WebConfig extends WebMvcConfigurerAdapter {
106
105
107
106
@ Override
@@ -122,7 +121,6 @@ public AsyncController asyncController() {
122
121
}
123
122
124
123
@ RestController
125
- @ SuppressWarnings ("unused" )
126
124
static class AsyncController {
127
125
128
126
@ RequestMapping (path = "/callable" )
Original file line number Diff line number Diff line change @@ -143,7 +143,6 @@ public PersonDao personDao() {
143
143
144
144
@ Configuration
145
145
@ EnableWebMvc
146
- @ SuppressWarnings ("unused" )
147
146
static class WebConfig extends WebMvcConfigurerAdapter {
148
147
149
148
@ Autowired
Original file line number Diff line number Diff line change 28
28
import org .springframework .http .converter .json .SpringHandlerInstantiator ;
29
29
import org .springframework .mock .web .test .MockHttpServletRequest ;
30
30
import org .springframework .stereotype .Controller ;
31
- import org .springframework .web .bind .annotation .PathVariable ;
32
31
import org .springframework .web .bind .annotation .RequestMapping ;
33
32
import org .springframework .web .context .WebApplicationContext ;
34
33
import org .springframework .web .context .support .WebApplicationContextUtils ;
@@ -138,7 +137,6 @@ public void springHandlerInstantiator() {
138
137
139
138
140
139
@ Controller
141
- @ SuppressWarnings ("unused" )
142
140
private static class PlaceholderController {
143
141
144
142
@ RequestMapping (value = "${sys.login.ajax}" )
@@ -162,7 +160,6 @@ protected WebApplicationContext initWebAppContext() {
162
160
}
163
161
164
162
@ Controller
165
- @ SuppressWarnings ("unused" )
166
163
private static class PersonController {
167
164
168
165
@ RequestMapping (value ="/persons" )
You can’t perform that action at this time.
0 commit comments