camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1085283 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/builder/ExpressionBuilder.java main/java/org/apache/camel/language/bean/BeanExpression.java test/java/org/apache/camel/language/SimpleTest.java
Date Fri, 25 Mar 2011 08:35:31 GMT
Author: davsclaus
Date: Fri Mar 25 08:35:31 2011
New Revision: 1085283

URL: http://svn.apache.org/viewvc?rev=1085283&view=rev
Log:
Fixed CS

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

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java?rev=1085283&r1=1085282&r2=1085283&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java Fri
Mar 25 08:35:31 2011
@@ -176,17 +176,14 @@ public final class ExpressionBuilder {
                     return header;
                 }
 
-                // Split ognl except
-                // when this is not a Map, Array
-                // and we would like to keep the dots
-                // within the key name
+                // Split ognl except when this is not a Map, Array
+                // and we would like to keep the dots within the key name
                 List<String> methods;
-
                 if (ognl.startsWith("[") && ognl.endsWith("]")) {
-                   methods = new ArrayList<String>();
-                   methods.add(ognl);
+                    methods = new ArrayList<String>();
+                    methods.add(ognl);
                 } else {
-                   methods = OgnlHelper.splitOgnl(ognl);
+                    methods = OgnlHelper.splitOgnl(ognl);
                 }
 
                 // remove any OGNL operators so we got the pure key name

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=1085283&r1=1085282&r2=1085283&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
Fri Mar 25 08:35:31 2011
@@ -182,17 +182,14 @@ public class BeanExpression implements E
             // loop and invoke each method
             Object beanToCall = bean;
 
-            // Split ognl except
-            // when this is not a Map, Array
-            // and we would like to keep the dots
-            // within the key name
+            // Split ognl except when this is not a Map, Array
+            // and we would like to keep the dots within the key name
             List<String> methods;
-
             if (ognl.startsWith("[") && ognl.endsWith("]")) {
-               methods = new ArrayList<String>();
-               methods.add(ognl);
+                methods = new ArrayList<String>();
+                methods.add(ognl);
             } else {
-               methods = OgnlHelper.splitOgnl(ognl);
+                methods = OgnlHelper.splitOgnl(ognl);
             }
 
             for (String methodName : methods) {

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleTest.java?rev=1085283&r1=1085282&r2=1085283&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleTest.java Fri Mar
25 08:35:31 2011
@@ -391,10 +391,10 @@ public class SimpleTest extends Language
 
     public void testOGNLHeaderMapWithDot() throws Exception {
         Map<String, Object> map = new HashMap<String, Object>();
-        map.put("this.code","This code");
+        map.put("this.code", "This code");
         exchange.getIn().setHeader("wicket", map);
 
-        assertExpression("${header.wicket[this.code]}","This code");
+        assertExpression("${header.wicket[this.code]}", "This code");
     }
 
     public void testOGNLHeaderMapNotMap() throws Exception {



Mime
View raw message