diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/message/MethodInvokingSource.java b/org.springframework.integration/src/main/java/org/springframework/integration/message/MethodInvokingSource.java index b056c6f7bb..ff75e9d9b2 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/message/MethodInvokingSource.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/message/MethodInvokingSource.java @@ -35,7 +35,7 @@ public class MethodInvokingSource implements MessageSource, Initializing private Object object; - private String method; + private String methodName; private NameResolvingMethodInvoker invoker; @@ -45,13 +45,13 @@ public class MethodInvokingSource implements MessageSource, Initializing this.object = object; } - public void setMethodName(String method) { - Assert.notNull(method, "'method' must not be null"); - this.method = method; + public void setMethodName(String methodName) { + Assert.notNull(methodName, "'methodName' must not be null"); + this.methodName = methodName; } public void afterPropertiesSet() { - this.invoker = new NameResolvingMethodInvoker(this.object, this.method); + this.invoker = new NameResolvingMethodInvoker(this.object, this.methodName); this.invoker.setMethodValidator(new MessageReceivingMethodValidator()); } @@ -63,10 +63,10 @@ public class MethodInvokingSource implements MessageSource, Initializing return new GenericMessage(this.invoker.invokeMethod(new Object[] {})); } catch (InvocationTargetException e) { throw new MessagingException( - "Source method '" + this.method + "' threw an Exception.", e.getTargetException()); + "Source method '" + this.methodName + "' threw an Exception.", e.getTargetException()); } catch (Throwable e) { - throw new MessagingException("Failed to invoke source method '" + this.method + "'."); + throw new MessagingException("Failed to invoke source method '" + this.methodName + "'."); } } diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/util/AbstractMethodInvokingAdapter.java b/org.springframework.integration/src/main/java/org/springframework/integration/util/AbstractMethodInvokingAdapter.java index 84d358d9fd..85fd4ad48d 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/util/AbstractMethodInvokingAdapter.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/util/AbstractMethodInvokingAdapter.java @@ -20,6 +20,7 @@ import java.lang.reflect.Method; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.factory.InitializingBean; import org.springframework.core.Ordered; import org.springframework.integration.ConfigurationException;