camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/3] git commit: Fix CAMEL-7680 : Throw NPE when stopping if transport client is used
Date Mon, 11 Aug 2014 18:54:05 GMT
Fix CAMEL-7680 : Throw NPE when stopping if transport client is used


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

Branch: refs/heads/camel-2.12.x
Commit: 4bbd0acc1e146adbdab09c1e53917759c7a99bab
Parents: 5a99e0b
Author: sebbrousse <seb.brousse@gmail.com>
Authored: Mon Aug 11 20:39:11 2014 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Aug 11 20:53:50 2014 +0200

----------------------------------------------------------------------
 .../camel/component/elasticsearch/ElasticsearchEndpoint.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4bbd0acc/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchEndpoint.java
b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchEndpoint.java
index 4d002ea..e83e32d 100644
--- a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchEndpoint.java
+++ b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchEndpoint.java
@@ -88,7 +88,9 @@ public class ElasticsearchEndpoint extends DefaultEndpoint {
             LOG.info("Leaving ElasticSearch cluster " + config.getClusterName());
         }
         client.close();
-        node.close();
+        if (node != null) {
+            node.close();
+        }
         super.doStop();
     }
 


Mime
View raw message