You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/12/05 14:04:12 UTC
[2/2] camel git commit: CAMEL-8086 Fixed the unit test error of
camel-josql
CAMEL-8086 Fixed the unit test error of camel-josql
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cf921222
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cf921222
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cf921222
Branch: refs/heads/camel-2.13.x
Commit: cf9212221e63a4318210c20aa5ffe77dd989d64c
Parents: a5eaffa
Author: Willem Jiang <wi...@gmail.com>
Authored: Fri Dec 5 20:59:05 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Fri Dec 5 21:03:55 2014 +0800
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/builder/sql/SqlBuilder.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/cf921222/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SqlBuilder.java
----------------------------------------------------------------------
diff --git a/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SqlBuilder.java b/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SqlBuilder.java
index 4fb1347..8481a9e 100644
--- a/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SqlBuilder.java
+++ b/components/camel-josql/src/main/java/org/apache/camel/builder/sql/SqlBuilder.java
@@ -127,7 +127,10 @@ public class SqlBuilder implements Expression, Predicate {
query.setVariable("exchange", exchange);
query.setVariable("in", exchange.getIn());
- query.setVariable("out", exchange.getOut());
+ // To avoid the side effect of creating out message without notice
+ if (exchange.hasOut()) {
+ query.setVariable("out", exchange.getOut());
+ }
}
protected void addVariables(Map<String, Object> map) {