Author: davsclaus
Date: Sun Mar 14 10:43:51 2010
New Revision: 922809

URL: http://svn.apache.org/viewvc?rev=922809&view=rev
Log:
CAMEL-2546: Added OGNL notation to simple/bean language. Work in progress.

Modified:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java?rev=922809&r1=922808&r2=922809&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java
 Sun Mar 14 10:43:51 2010
@@ -147,7 +147,6 @@ public class BeanExpression implements E
         private final Object bean;
         private final String ognl;
         private Object result;
-        private boolean startElvis;
 
         public OgnlInvokeProcessor(Object bean, String ognl) {
             this.bean = bean;
@@ -156,30 +155,23 @@ public class BeanExpression implements E
             this.result = bean;
         }
 
-
         public void process(Exchange exchange) throws Exception {
             // copy the original exchange to avoid side effects on it
             Exchange resultExchange = exchange.copy();
             // force to use InOut to retrieve the result on the OUT message
             resultExchange.setPattern(ExchangePattern.InOut);
 
-            // loop and invoke each method
-            Object beanToCall = bean;
-
             // current ognl path as we go along
             String ognlPath = "";
 
+            // loop and invoke each method
+            Object beanToCall = bean;
             List<String> methods = OgnlHelper.splitOgnl(ognl);
             for (String methodName : methods) {
                 BeanHolder holder = new ConstantBeanHolder(beanToCall, 
exchange.getContext());
 
                 // support the elvis operator
                 boolean elvis = OgnlHelper.isElvis(methodName);
-                if (startElvis) {
-                    elvis = true;
-                    // flip flag to not apply elvis the next time
-                    startElvis = false;
-                }
 
                 // keep up with how far are we doing
                 ognlPath += methodName;


Reply via email to