You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2020/09/07 15:23:58 UTC

[camel] branch master updated: CAMEL-15506: Fixed annotation proxy usage in BeanAnnotationExpressionFactory

This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 1fa0e2d  CAMEL-15506: Fixed annotation proxy usage in BeanAnnotationExpressionFactory
1fa0e2d is described below

commit 1fa0e2d3a7dedc3cd75d3bbd688b3e1c79a4e5ce
Author: aldettinger <al...@gmail.com>
AuthorDate: Mon Sep 7 17:11:26 2020 +0200

    CAMEL-15506: Fixed annotation proxy usage in BeanAnnotationExpressionFactory
---
 .../apache/camel/component/bean/BeanAnnotationExpressionFactory.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanAnnotationExpressionFactory.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanAnnotationExpressionFactory.java
index 6945ef1..8096d0f 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanAnnotationExpressionFactory.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanAnnotationExpressionFactory.java
@@ -54,7 +54,7 @@ public class BeanAnnotationExpressionFactory extends DefaultAnnotationExpression
 
     protected String getFromAnnotation(Annotation annotation, String attribute) {
         try {
-            Method method = annotation.getClass().getMethod(attribute);
+            Method method = annotation.annotationType().getDeclaredMethod(attribute);
             Object value = ObjectHelper.invokeMethod(method, annotation);
             if (value == null) {
                 throw new IllegalArgumentException("Cannot determine the " + attribute + " from the annotation: " + annotation);