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 2016/12/18 12:31:40 UTC

[1/2] camel git commit: CAMEL-10609: Improve simple functions that requires parameters to not parse text that happens to use same name as the function name.

Repository: camel
Updated Branches:
  refs/heads/master a2d0acc1c -> ede810223


CAMEL-10609: Improve simple functions that requires parameters to not parse text that happens to use same name as the function name.


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

Branch: refs/heads/master
Commit: 57e4210fc45dab5b1645e4c9e087636617baac5f
Parents: a2d0acc
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Dec 18 13:25:51 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Dec 18 13:25:51 2016 +0100

----------------------------------------------------------------------
 .../simple/ast/SimpleFunctionExpression.java    | 24 ++++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/57e4210f/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java b/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
index caddbab..5affb51 100644
--- a/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
+++ b/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
@@ -235,9 +235,9 @@ public class SimpleFunctionExpression extends LiteralExpression {
 
     private Expression createSimpleExpressionBodyOrHeader(String function, boolean strict) {
         // bodyAs
-        String remainder = ifStartsWithReturnRemainder("bodyAs", function);
+        String remainder = ifStartsWithReturnRemainder("bodyAs(", function);
         if (remainder != null) {
-            String type = ObjectHelper.between(remainder, "(", ")");
+            String type = ObjectHelper.before(remainder, ")");
             if (type == null) {
                 throw new SimpleParserException("Valid syntax: ${bodyAs(type)} was: " + function, token.getIndex());
             }
@@ -255,9 +255,9 @@ public class SimpleFunctionExpression extends LiteralExpression {
 
         }
         // mandatoryBodyAs
-        remainder = ifStartsWithReturnRemainder("mandatoryBodyAs", function);
+        remainder = ifStartsWithReturnRemainder("mandatoryBodyAs(", function);
         if (remainder != null) {
-            String type = ObjectHelper.between(remainder, "(", ")");
+            String type = ObjectHelper.before(remainder, ")");
             if (type == null) {
                 throw new SimpleParserException("Valid syntax: ${mandatoryBodyAs(type)} was: " + function, token.getIndex());
             }
@@ -288,9 +288,9 @@ public class SimpleFunctionExpression extends LiteralExpression {
         }
 
         // headerAs
-        remainder = ifStartsWithReturnRemainder("headerAs", function);
+        remainder = ifStartsWithReturnRemainder("headerAs(", function);
         if (remainder != null) {
-            String keyAndType = ObjectHelper.between(remainder, "(", ")");
+            String keyAndType = ObjectHelper.before(remainder, ")");
             if (keyAndType == null) {
                 throw new SimpleParserException("Valid syntax: ${headerAs(key, type)} was: " + function, token.getIndex());
             }
@@ -431,9 +431,9 @@ public class SimpleFunctionExpression extends LiteralExpression {
         String remainder;
 
         // random function
-        remainder = ifStartsWithReturnRemainder("random", function);
+        remainder = ifStartsWithReturnRemainder("random(", function);
         if (remainder != null) {
-            String values = ObjectHelper.between(remainder, "(", ")");
+            String values = ObjectHelper.before(remainder, ")");
             if (values == null || ObjectHelper.isEmpty(values)) {
                 throw new SimpleParserException("Valid syntax: ${random(min,max)} or ${random(max)} was: " + function, token.getIndex());
             }
@@ -449,9 +449,9 @@ public class SimpleFunctionExpression extends LiteralExpression {
         }
 
         // skip function
-        remainder = ifStartsWithReturnRemainder("skip", function);
+        remainder = ifStartsWithReturnRemainder("skip(", function);
         if (remainder != null) {
-            String values = ObjectHelper.between(remainder, "(", ")");
+            String values = ObjectHelper.before(remainder, ")");
             if (values == null || ObjectHelper.isEmpty(values)) {
                 throw new SimpleParserException("Valid syntax: ${skip(number)} was: " + function, token.getIndex());
             }
@@ -461,9 +461,9 @@ public class SimpleFunctionExpression extends LiteralExpression {
         }
 
         // collate function
-        remainder = ifStartsWithReturnRemainder("collate", function);
+        remainder = ifStartsWithReturnRemainder("collate(", function);
         if (remainder != null) {
-            String values = ObjectHelper.between(remainder, "(", ")");
+            String values = ObjectHelper.before(remainder, ")");
             if (values == null || ObjectHelper.isEmpty(values)) {
                 throw new SimpleParserException("Valid syntax: ${collate(group)} was: " + function, token.getIndex());
             }


[2/2] camel git commit: CAMEL-9945: Upgrade to Jetty 9.3

Posted by da...@apache.org.
CAMEL-9945: Upgrade to Jetty 9.3


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

Branch: refs/heads/master
Commit: ede810223d9fca38caaf8e8d0c13231efea85356
Parents: 57e4210
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Dec 18 13:31:34 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Dec 18 13:31:34 2016 +0100

----------------------------------------------------------------------
 examples/camel-example-cxf/pom.xml | 39 ++++++++++++++++++++++++++++-----
 1 file changed, 34 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ede81022/examples/camel-example-cxf/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-cxf/pom.xml b/examples/camel-example-cxf/pom.xml
index acb4aab..f1413f3 100644
--- a/examples/camel-example-cxf/pom.xml
+++ b/examples/camel-example-cxf/pom.xml
@@ -30,6 +30,10 @@
   <name>Camel :: Example :: CXF</name>
   <description>An example which demonstrates the use of the Camel CXF component</description>
 
+  <properties>
+    <jetty9-version>${jetty92-version}</jetty9-version>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.camel</groupId>
@@ -52,14 +56,39 @@
     </dependency>
 
     <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-jetty9</artifactId>
-    </dependency>
-
-    <dependency>
       <groupId>org.apache.cxf</groupId>
       <artifactId>cxf-rt-transports-http-jetty</artifactId>
       <version>${cxf-version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-server</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-util</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-io</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-security</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-continuation</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-http</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-jetty9</artifactId>
     </dependency>
 
     <dependency>