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 2020/03/11 21:54:04 UTC

[camel] branch master updated (eea2c43 -> c3ed7fd)

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

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


    from eea2c43  CAMEL-14697: consider parameters from path
     new 058ee64  camel-bean - optimize
     new c3ed7fd  camel-bean - optimize

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/camel/component/bean/BeanInfo.java   | 16 ----------------
 .../java/org/apache/camel/component/bean/MethodInfo.java |  4 ++--
 2 files changed, 2 insertions(+), 18 deletions(-)


[camel] 02/02: camel-bean - optimize

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c3ed7fd0275586e65af457d90569891175f61c6d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Mar 11 22:38:24 2020 +0100

    camel-bean - optimize
---
 .../java/org/apache/camel/component/bean/BeanInfo.java   | 16 ----------------
 1 file changed, 16 deletions(-)

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 13ff155..16a3818 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
@@ -171,25 +171,9 @@ public class BeanInfo {
 
     public MethodInvocation createInvocation(Object pojo, Exchange exchange)
         throws AmbiguousMethodCallException, MethodNotFoundException {
-        return createInvocation(pojo, exchange, null);
-    }
 
-    private MethodInvocation createInvocation(Object pojo, Exchange exchange, Method explicitMethod)
-        throws AmbiguousMethodCallException, MethodNotFoundException {
         MethodInfo methodInfo = null;
         
-        // find the explicit method to invoke
-        if (explicitMethod != null) {
-            for (List<MethodInfo> infos : operations.values()) {
-                for (MethodInfo info : infos) {
-                    if (explicitMethod.equals(info.getMethod())) {
-                        return info.createMethodInvocation(pojo, info.hasParameters(), exchange);
-                    }
-                }
-            }
-            throw new MethodNotFoundException(exchange, pojo, explicitMethod.getName());
-        }
-
         String methodName = exchange.getIn().getHeader(Exchange.BEAN_METHOD_NAME, String.class);
         if (methodName != null) {
 


[camel] 01/02: camel-bean - optimize

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 058ee64e8c1bc35af0266bdefde5e596f61dc553
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Mar 11 22:23:37 2020 +0100

    camel-bean - optimize
---
 .../src/main/java/org/apache/camel/component/bean/MethodInfo.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java
index 96a68c5..cccb001 100644
--- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java
+++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/MethodInfo.java
@@ -270,7 +270,7 @@ public class MethodInfo {
                 }
 
                 //If it's Java 8 async result
-                if (CompletionStage.class.isAssignableFrom(getMethod().getReturnType())) {
+                if (CompletionStage.class.isAssignableFrom(method.getReturnType())) {
                     CompletionStage<?> completionStage = (CompletionStage<?>) result;
 
                     completionStage
@@ -286,7 +286,7 @@ public class MethodInfo {
                 }
 
                 // if the method returns something then set the value returned on the Exchange
-                if (!getMethod().getReturnType().equals(Void.TYPE) && result != Void.TYPE) {
+                if (result != Void.TYPE && !method.getReturnType().equals(Void.TYPE)) {
                     fillResult(exchange, result);
                 }