Repository: camel
Updated Branches:
  refs/heads/master 9cbf3601c -> e5af49da3


Fixed polished as beanName must not return ref prefix


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e5af49da
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e5af49da
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e5af49da

Branch: refs/heads/master
Commit: e5af49da3ff67952e1ff4ac2d027953a9c778002
Parents: 9cbf360
Author: Claus Ibsen <davscl...@apache.org>
Authored: Wed Nov 18 08:42:55 2015 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Wed Nov 18 08:42:55 2015 +0100

----------------------------------------------------------------------
 .../org/apache/camel/model/language/MethodCallExpression.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e5af49da/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java
 
b/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java
index e4587e8..afd2ffd 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java
@@ -257,9 +257,9 @@ public class MethodCallExpression extends 
ExpressionDefinition {
 
     protected String beanName() {
         if (bean != null) {
-            return "ref:" + bean;
+            return bean;
         } else if (ref != null) {
-            return "ref:" + ref;
+            return ref;
         } else if (instance != null) {
             return ObjectHelper.className(instance);
         }
@@ -268,6 +268,7 @@ public class MethodCallExpression extends 
ExpressionDefinition {
 
     @Override
     public String toString() {
-        return "bean[" + beanName() + (method != null ? " method:" + method : 
"") + "]";
+        boolean isRef = bean != null || ref != null;
+        return "bean[" + (isRef ? "ref:" : "") + beanName() + (method != null 
? " method:" + method : "") + "]";
     }
 }
\ No newline at end of file

Reply via email to