Skip to content

Commit a9c47df

Browse files
committed
Polishing
1 parent d1288fd commit a9c47df

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

spring-messaging/src/main/java/org/springframework/messaging/handler/DestinationPatternsMessageCondition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public DestinationPatternsMessageCondition(String... patterns) {
6060
/**
6161
* Alternative constructor accepting a custom PathMatcher.
6262
* @param patterns the URL patterns to use; if 0, the condition will match to every request.
63-
* @param pathMatcher the PathMatcher to use.
63+
* @param pathMatcher the PathMatcher to use
6464
*/
6565
public DestinationPatternsMessageCondition(String[] patterns, PathMatcher pathMatcher) {
6666
this(asList(patterns), pathMatcher);

spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportTests.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
*/
9494
public class WebMvcConfigurationSupportTests {
9595

96-
9796
@Test
9897
public void requestMappingHandlerMapping() throws Exception {
9998
ApplicationContext context = initContext(WebConfig.class, ScopedController.class, ScopedProxyController.class);
@@ -208,10 +207,9 @@ public void uriComponentsContributor() throws Exception {
208207
public void handlerExceptionResolver() throws Exception {
209208
ApplicationContext context = initContext(WebConfig.class);
210209
HandlerExceptionResolverComposite compositeResolver =
211-
context.getBean("handlerExceptionResolver", HandlerExceptionResolverComposite.class);
210+
context.getBean("handlerExceptionResolver", HandlerExceptionResolverComposite.class);
212211

213212
assertEquals(0, compositeResolver.getOrder());
214-
215213
List<HandlerExceptionResolver> expectedResolvers = compositeResolver.getExceptionResolvers();
216214

217215
assertEquals(ExceptionHandlerExceptionResolver.class, expectedResolvers.get(0).getClass());
@@ -237,17 +235,13 @@ public void handlerExceptionResolver() throws Exception {
237235
finally {
238236
LocaleContextHolder.resetLocaleContext();
239237
}
240-
241238
}
242239

243240
@Test
244241
public void mvcViewResolver() {
245242
ApplicationContext context = initContext(WebConfig.class);
246243
ViewResolverComposite resolver = context.getBean("mvcViewResolver", ViewResolverComposite.class);
247244

248-
Map<String, ViewResolver> map = BeanFactoryUtils.beansOfTypeIncludingAncestors(
249-
context, ViewResolver.class, true, false);
250-
251245
assertNotNull(resolver);
252246
assertEquals(1, resolver.getViewResolvers().size());
253247
assertEquals(InternalResourceViewResolver.class, resolver.getViewResolvers().get(0).getClass());
@@ -317,6 +311,7 @@ public MessageSource messageSource() {
317311
}
318312
}
319313

314+
320315
@Configuration
321316
public static class ViewResolverConfig {
322317

@@ -326,6 +321,7 @@ public ViewResolver beanNameViewResolver() {
326321
}
327322
}
328323

324+
329325
@EnableWebMvc
330326
@Configuration
331327
public static class CustomViewResolverOrderConfig extends WebMvcConfigurerAdapter {
@@ -337,6 +333,7 @@ public void configureViewResolvers(ViewResolverRegistry registry) {
337333
}
338334
}
339335

336+
340337
@Controller
341338
public static class TestController {
342339

@@ -371,6 +368,7 @@ public void handle() {
371368
}
372369
}
373370

371+
374372
@ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "exception.user.exists")
375373
public static class UserAlreadyExistsException extends RuntimeException {
376374
}

0 commit comments

Comments
 (0)