camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [2/2] camel git commit: Fixed CS
Date Tue, 21 Jul 2015 15:44:18 GMT
Fixed CS


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

Branch: refs/heads/master
Commit: b63db70a5f19a2787735d400868a0dabd391f25b
Parents: 7ee11a6
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Tue Jul 21 17:42:01 2015 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Tue Jul 21 17:42:01 2015 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/builder/ExpressionBuilder.java    | 2 +-
 .../camel/language/simple/ast/SimpleFunctionExpression.java      | 2 +-
 .../test/java/org/apache/camel/language/simple/SimpleTest.java   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b63db70a/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
index 6d722fb3..85c3ec8 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
@@ -1878,7 +1878,7 @@ public final class ExpressionBuilder {
         return new ExpressionAdapter() {
             public Object evaluate(Exchange exchange) {
                 Random random = new Random();
-                int randomNum = random.nextInt((max - min)) + min;
+                int randomNum = random.nextInt(max - min) + min;
                 return randomNum;
             }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/b63db70a/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 2bb52ce..5a980f3 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
@@ -336,7 +336,7 @@ public class SimpleFunctionExpression extends LiteralExpression {
                 }
                 int min = Integer.parseInt(tokens[0]);
                 int max = Integer.parseInt(tokens[1]);
-                return ExpressionBuilder.randomExpression(min,max);
+                return ExpressionBuilder.randomExpression(min, max);
             } else {
                 int max = Integer.parseInt(values);
                 return ExpressionBuilder.randomExpression(max);

http://git-wip-us.apache.org/repos/asf/camel/blob/b63db70a/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 04da41c..28e6eca 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
@@ -1445,11 +1445,11 @@ 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);
         }
-        for (i=0;i<iterations;i++) {
+        for (i = 0; i < iterations; i++) {
             Expression expression = SimpleLanguage.simple("random(10)", Integer.class);
             assertTrue(0 <= expression.evaluate(exchange, Integer.class) && expression.evaluate(exchange,
Integer.class) < max);
         }


Mime
View raw message