From 3226f21ef3bd655744dbee9f69eac9d01fca7f2b Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Wed, 30 May 2007 11:59:03 +0000 Subject: [PATCH] Checkstyle. --- .../ws/server/MessageDispatcher.java | 46 ++++++++----------- .../ws/server/endpoint/MethodEndpoint.java | 15 +++--- 2 files changed, 28 insertions(+), 33 deletions(-) diff --git a/core/src/main/java/org/springframework/ws/server/MessageDispatcher.java b/core/src/main/java/org/springframework/ws/server/MessageDispatcher.java index b2f81579..5e17faa4 100644 --- a/core/src/main/java/org/springframework/ws/server/MessageDispatcher.java +++ b/core/src/main/java/org/springframework/ws/server/MessageDispatcher.java @@ -41,27 +41,20 @@ import org.springframework.ws.transport.WebServiceMessageReceiver; import org.springframework.ws.transport.support.DefaultStrategiesHelper; /** - * Central dispatcher for use within Spring-WS, dispatching Web service messages to - * registered endpoints. - * - *

This dispatcher is quite similar to Spring MVCs DispatcherServlet. - * Just like its counterpart, this dispatcher is very flexible. - * - *

+ * Central dispatcher for use within Spring-WS, dispatching Web service messages to registered endpoints. + *

+ *

This dispatcher is quite similar to Spring MVCs DispatcherServlet. Just like its counterpart, this + * dispatcher is very flexible. + *

+ *

* * @author Arjen Poutsma * @see EndpointMapping @@ -75,7 +68,8 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa public static final String ENDPOINT_NOT_FOUND_LOG_CATEGORY = "org.springframework.ws.EndpointNotFound"; /** Additional logger to use when no mapped endpoint is found for a request. */ - protected static final Log endpointNotFoundLogger = LogFactory.getLog(ENDPOINT_NOT_FOUND_LOG_CATEGORY); + protected static final Log endpointNotFoundLogger = + LogFactory.getLog(MessageDispatcher.ENDPOINT_NOT_FOUND_LOG_CATEGORY); /** Logger available to subclasses. */ protected final Log logger = LogFactory.getLog(getClass()); @@ -85,13 +79,13 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa /** The registered bean name for this dispatcher. */ private String beanName; - /** List of EndpointAdapters used in this dispatcher */ + /** List of EndpointAdapters used in this dispatcher. */ private List endpointAdapters; - /** List of EndpointExceptionResolvers used in this dispatcher */ + /** List of EndpointExceptionResolvers used in this dispatcher. */ private List endpointExceptionResolvers; - /** List of EndpointMappings used in this dispatcher */ + /** List of EndpointMappings used in this dispatcher. */ private List endpointMappings; /** Initializes a new instance of the MessageDispatcher. */ @@ -130,7 +124,7 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa this.endpointMappings = endpointMappings; } - public void setBeanName(String beanName) { + public final void setBeanName(String beanName) { this.beanName = beanName; } diff --git a/core/src/main/java/org/springframework/ws/server/endpoint/MethodEndpoint.java b/core/src/main/java/org/springframework/ws/server/endpoint/MethodEndpoint.java index 99d138a7..bfc02659 100644 --- a/core/src/main/java/org/springframework/ws/server/endpoint/MethodEndpoint.java +++ b/core/src/main/java/org/springframework/ws/server/endpoint/MethodEndpoint.java @@ -54,22 +54,23 @@ public final class MethodEndpoint { * @param bean the object bean * @param methodName the method name * @param parameterTypes the method parameter types + * @throws NoSuchMethodException when the method cannot be found */ public MethodEndpoint(Object bean, String methodName, Class[] parameterTypes) throws NoSuchMethodException { Assert.notNull(bean, "bean must not be null"); Assert.notNull(methodName, "method must not be null"); this.bean = bean; - method = bean.getClass().getMethod(methodName, parameterTypes); + this.method = bean.getClass().getMethod(methodName, parameterTypes); } /** Returns the object bean for this method endpoint. */ public Object getBean() { - return bean; + return this.bean; } /** Returns the method for this method endpoint. */ public Method getMethod() { - return method; + return this.method; } /** @@ -81,7 +82,7 @@ public final class MethodEndpoint { * @throws InvocationTargetException when the method invocation results in an exception */ public Object invoke(Object[] args) throws IllegalAccessException, InvocationTargetException { - return ReflectionUtils.invokeMethod(method, bean, args); + return ReflectionUtils.invokeMethod(this.method, this.bean, args); } public boolean equals(Object o) { @@ -90,16 +91,16 @@ public final class MethodEndpoint { } if (o != null && o instanceof MethodEndpoint) { MethodEndpoint other = (MethodEndpoint) o; - return bean.equals(other.bean) && method.equals(other.method); + return this.bean.equals(other.bean) && this.method.equals(other.method); } return false; } public int hashCode() { - return 31 * bean.hashCode() + method.hashCode(); + return 31 * this.bean.hashCode() + this.method.hashCode(); } public String toString() { - return method.toString(); + return this.method.toString(); } }