From 9cb7816e42a9113d25fa4decccd2e85e17619700 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 3 Mar 2010 17:26:50 +0000 Subject: [PATCH] INT-998 no longer calling toString, but displaying the targetObject's class instead --- .../handler/MethodInvokingMessageProcessor.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/handler/MethodInvokingMessageProcessor.java b/org.springframework.integration/src/main/java/org/springframework/integration/handler/MethodInvokingMessageProcessor.java index 9811327d4b..28eb10ae8d 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/handler/MethodInvokingMessageProcessor.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/handler/MethodInvokingMessageProcessor.java @@ -61,6 +61,14 @@ import org.springframework.util.ReflectionUtils.MethodCallback; import org.springframework.util.ReflectionUtils.MethodFilter; /** + * A MessageProcessor implementation that invokes a method on a target Object. + * The Method instance or method name may be provided as a constructor argument. + * If a method name is provided, and more than one declared method has that name, + * the method-selection will be dynamic, based on the underlying SpEL method + * resolution. Alternatively, an annotation type may be provided so that the + * candidates for SpEL's method resolution are determined by the presence of that + * annotation rather than the method name. + * * @author Mark Fisher * @author Oleg Zhurakousky * @since 2.0 @@ -255,7 +263,7 @@ public class MethodInvokingMessageProcessor implements MessageProcessor { if (!candidateMethods.isEmpty()) { return candidateMethods; } - Assert.notEmpty(fallbackMethods, "Target object [" + this.targetObject + + Assert.notEmpty(fallbackMethods, "Target object of type [" + this.targetObject.getClass() + "] has no eligible methods for handling Messages."); Assert.isNull(ambiguousFallbackType.get(), "Found more than one method match for type [" + ambiguousFallbackType + "]");