You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2009/06/09 16:09:34 UTC

svn commit: r783006 - /camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java

Author: davsclaus
Date: Tue Jun  9 14:09:34 2009
New Revision: 783006

URL: http://svn.apache.org/viewvc?rev=783006&view=rev
Log:
Skipping java.lang.reflect.Proxy methods and fixed a spelling.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java?rev=783006&r1=783005&r2=783006&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java Tue Jun  9 14:09:34 2009
@@ -19,6 +19,7 @@
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -82,9 +83,11 @@
         synchronized (EXCLUDED_METHODS) {
             if (EXCLUDED_METHODS.size() == 0) {
                 // exclude all java.lang.Object methods as we dont want to invoke them
-                for (Method method : Object.class.getMethods()) {
-                    EXCLUDED_METHODS.add(method);
-                }
+                EXCLUDED_METHODS.addAll(Arrays.asList(Object.class.getMethods()));
+                // exclude all java.lang.reflect.Proxy methods as we dont want to invoke them
+                EXCLUDED_METHODS.addAll(Arrays.asList(Proxy.class.getMethods()));
+
+                // TODO: AOP proxies have additional methods - well known methods should be added to EXCLUDE_METHODS
             }
         }
 
@@ -146,7 +149,7 @@
         }
         if (methodInfo != null) {
             if (LOG.isTraceEnabled()) {
-                LOG.trace("Choosed method to invoke: " + methodInfo + " on bean: " + pojo);
+                LOG.trace("Chosen method to invoke: " + methodInfo + " on bean: " + pojo);
             }
             return methodInfo.createMethodInvocation(pojo, exchange);
         }
@@ -378,8 +381,6 @@
             List<MethodInfo> possibles = new ArrayList<MethodInfo>();
             List<MethodInfo> possiblesWithException = new ArrayList<MethodInfo>();
             for (MethodInfo methodInfo : operationList) {
-                // TODO: AOP proxies have additional methods - well known methods should be added to EXCLUDE_METHODS
-
                 // test for MEP pattern matching
                 boolean out = exchange.getPattern().isOutCapable();
                 if (out && methodInfo.isReturnTypeVoid()) {