From 730bd02da7fda65cec98c6cfc2902f9b1956fc67 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 30 Dec 2014 15:01:51 +0100 Subject: [PATCH] Polishing --- .../SimpAnnotationMethodMessageHandler.java | 18 +++++++++--------- .../org/springframework/web/util/WebUtils.java | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandler.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandler.java index a1991072aa2c..25a0878083f2 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandler.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandler.java @@ -188,7 +188,7 @@ public void setConversionService(ConversionService conversionService) { } /** - * The configured {@link ConversionService}. + * Return the configured {@link ConversionService}. */ public ConversionService getConversionService() { return this.conversionService; @@ -206,14 +206,14 @@ public void setPathMatcher(PathMatcher pathMatcher) { } /** - * Return the PathMatcher implementation to use for matching destinations + * Return the PathMatcher implementation to use for matching destinations. */ public PathMatcher getPathMatcher() { return this.pathMatcher; } /** - * The configured Validator instance + * Return the configured Validator instance. */ public Validator getValidator() { return this.validator; @@ -343,17 +343,17 @@ protected boolean isHandler(Class beanType) { @Override protected SimpMessageMappingInfo getMappingForMethod(Method method, Class handlerType) { MessageMapping typeAnnotation = AnnotationUtils.findAnnotation(handlerType, MessageMapping.class); - MessageMapping messageAnnot = AnnotationUtils.findAnnotation(method, MessageMapping.class); - if (messageAnnot != null) { - SimpMessageMappingInfo result = createMessageMappingCondition(messageAnnot); + MessageMapping messageAnnotation = AnnotationUtils.findAnnotation(method, MessageMapping.class); + if (messageAnnotation != null) { + SimpMessageMappingInfo result = createMessageMappingCondition(messageAnnotation); if (typeAnnotation != null) { result = createMessageMappingCondition(typeAnnotation).combine(result); } return result; } - SubscribeMapping subsribeAnnotation = AnnotationUtils.findAnnotation(method, SubscribeMapping.class); - if (subsribeAnnotation != null) { - SimpMessageMappingInfo result = createSubscribeCondition(subsribeAnnotation); + SubscribeMapping subscribeAnnotation = AnnotationUtils.findAnnotation(method, SubscribeMapping.class); + if (subscribeAnnotation != null) { + SimpMessageMappingInfo result = createSubscribeCondition(subscribeAnnotation); if (typeAnnotation != null) { result = createMessageMappingCondition(typeAnnotation).combine(result); } diff --git a/spring-web/src/main/java/org/springframework/web/util/WebUtils.java b/spring-web/src/main/java/org/springframework/web/util/WebUtils.java index d07fad227aea..4a35eccce6e6 100644 --- a/spring-web/src/main/java/org/springframework/web/util/WebUtils.java +++ b/spring-web/src/main/java/org/springframework/web/util/WebUtils.java @@ -207,7 +207,7 @@ public static Boolean getDefaultHtmlEscape(ServletContext servletContext) { return null; } String param = servletContext.getInitParameter(HTML_ESCAPE_CONTEXT_PARAM); - return (StringUtils.hasText(param)? Boolean.valueOf(param) : null); + return (StringUtils.hasText(param) ? Boolean.valueOf(param) : null); } /** @@ -227,7 +227,7 @@ public static Boolean getResponseEncodedHtmlEscape(ServletContext servletContext return null; } String param = servletContext.getInitParameter(RESPONSE_ENCODED_HTML_ESCAPE_CONTEXT_PARAM); - return (StringUtils.hasText(param)? Boolean.valueOf(param) : null); + return (StringUtils.hasText(param) ? Boolean.valueOf(param) : null); } /**