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 2017/01/05 12:04:26 UTC
[3/4] camel git commit: CAMEL-10664: Simple language parser should
not lazt evaluate type function which otherwise would be regarded as a nested
OGNL method call chain.
CAMEL-10664: Simple language parser should not lazt evaluate type function which otherwise would be regarded as a nested OGNL method call chain.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/efc73511
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/efc73511
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/efc73511
Branch: refs/heads/master
Commit: efc735119feaae09adbbc299837286237a6a9098
Parents: b2c6fcc
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Jan 5 13:03:57 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Jan 5 13:03:57 2017 +0100
----------------------------------------------------------------------
.../test/java/org/apache/camel/language/simple/SimpleTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/efc73511/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java b/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
index 4293284..2bf3e3a 100644
--- a/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
+++ b/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
@@ -1574,7 +1574,7 @@ public class SimpleTest extends LanguageTestSupport {
int max = 10;
int iterations = 30;
int i = 0;
-/* for (i = 0; i < iterations; i++) {
+ for (i = 0; i < iterations; i++) {
Expression expression = SimpleLanguage.simple("${random(1,10)}", Integer.class);
assertTrue(min <= expression.evaluate(exchange, Integer.class) && expression.evaluate(exchange, Integer.class) < max);
}
@@ -1599,7 +1599,7 @@ public class SimpleTest extends LanguageTestSupport {
fail("Should have thrown exception");
} catch (Exception e) {
assertEquals("Valid syntax: ${random(min,max)} or ${random(max)} was: random()", e.getCause().getMessage());
- } */
+ }
exchange.getIn().setHeader("max", 20);
Expression expression3 = SimpleLanguage.simple("${random(10,${header.max})}", Integer.class);