You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2022/06/21 08:34:44 UTC

[camel] branch main updated: CAMEL-18211: Make BeanInfo handle Quarkus Arc generated sub classes

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 808a03e96bc CAMEL-18211: Make BeanInfo handle Quarkus Arc generated sub classes
808a03e96bc is described below

commit 808a03e96bc155f335be8f2edaf01780957b6a85
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Jun 21 07:23:09 2022 +0100

    CAMEL-18211: Make BeanInfo handle Quarkus Arc generated sub classes
---
 .../src/main/java/org/apache/camel/component/bean/BeanInfo.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
index d15b5fa52eb..1c1c8ba4397 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/BeanInfo.java
@@ -65,6 +65,7 @@ public class BeanInfo {
     private static final String CGLIB_METHOD_MARKER = "CGLIB$";
     private static final String BYTE_BUDDY_METHOD_MARKER = "$accessor$";
     private static final String CLIENT_PROXY_SUFFIX = "_ClientProxy";
+    private static final String SUBCLASS_SUFFIX = "_Subclass";
     private static final String[] EXCLUDED_METHOD_NAMES = new String[] {
             "equals", "finalize", "getClass", "hashCode", "notify", "notifyAll", "wait", // java.lang.Object
             "getInvocationHandler", "getProxyClass", "isProxyClass", "newProxyInstance" // java.lang.Proxy
@@ -1145,7 +1146,8 @@ public class BeanInfo {
 
     private static Class<?> getTargetClass(Class<?> clazz) {
         if (clazz != null
-                && (clazz.getName().contains(CGLIB_CLASS_SEPARATOR) || clazz.getName().endsWith(CLIENT_PROXY_SUFFIX))) {
+                && (clazz.getName().contains(CGLIB_CLASS_SEPARATOR) || clazz.getName().endsWith(CLIENT_PROXY_SUFFIX)
+                        || clazz.getName().endsWith(SUBCLASS_SUFFIX))) {
             Class<?> superClass = clazz.getSuperclass();
             if (superClass != null && !Object.class.equals(superClass)) {
                 return superClass;