camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: CAMEL-10961: Backported parts of CAMEL-10292 in order to fix possible NPE in ZooKeeperProducer.
Date Fri, 10 Mar 2017 12:35:55 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 8620ae9e5 -> dc46e915d


CAMEL-10961: Backported parts of CAMEL-10292 in order to fix possible NPE in ZooKeeperProducer.


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

Branch: refs/heads/camel-2.18.x
Commit: dc46e915da034a0a07ff7348f19b711e0c6e4387
Parents: 8620ae9
Author: Andreas Ländle <andreas.laendle@de.bosch.com>
Authored: Fri Mar 10 13:17:12 2017 +0100
Committer: Andreas Ländle <andreas.laendle@de.bosch.com>
Committed: Fri Mar 10 13:17:12 2017 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/zookeeper/ZooKeeperProducer.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dc46e915/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperProducer.java
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperProducer.java
index 449a138..37b236e 100644
--- a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperProducer.java
+++ b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperProducer.java
@@ -64,6 +64,9 @@ public class ZooKeeperProducer extends DefaultProducer {
 
     public void process(Exchange exchange) throws Exception {
 
+        if (connection == null) {
+            connection = this.zkm.getConnection();
+        }
         ProductionContext context = new ProductionContext(connection, exchange);
 
         String operation = exchange.getIn().getHeader(ZooKeeperMessage.ZOOKEEPER_OPERATION,
String.class);


Mime
View raw message