BATCH-1124: Fixed error message that is seen when a class contains two methods with the same listener annotation.

This commit is contained in:
dhgarrette
2009-03-06 22:55:38 +00:00
parent c24e4b39ea
commit dee9420cda

View File

@@ -41,7 +41,8 @@ public class MethodInvokerUtils {
* @param object to be invoked
* @param methodName of the method to be invoked
* @param paramsRequired boolean indicating whether the parameters are
* required, if false, a no args version of the method will be searched for.
* required, if false, a no args version of the method will be
* searched for.
* @param paramTypes - parameter types of the method to search for.
* @return MethodInvoker if the method is found, null if it is not.
*/
@@ -105,8 +106,9 @@ public class MethodInvokerUtils {
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
Annotation annotation = AnnotationUtils.findAnnotation(method, annotationType);
if (annotation != null) {
Assert.isNull(annotatedMethod.get(), "found more than one method on target class [" + candidate
+ "] with the annotation type [" + candidate + "]");
Assert.isNull(annotatedMethod.get(), "found more than one method on target class ["
+ candidate.getClass().getSimpleName() + "] with the annotation type ["
+ annotationType.getSimpleName() + "].");
annotatedMethod.set(method);
}
}