karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf-decanter git commit: [KARAF-4125] Fix elasticsearch configuration overriding and elasticsearch node restart
Date Thu, 19 Nov 2015 15:15:15 GMT
Repository: karaf-decanter
Updated Branches:
  refs/heads/master 6aa3bcb66 -> a77b7a05f


[KARAF-4125] Fix elasticsearch configuration overriding and elasticsearch node restart


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

Branch: refs/heads/master
Commit: a77b7a05ff4cdbaeadc527d337f2703421dc7014
Parents: 6aa3bcb
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Thu Nov 19 16:13:28 2015 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Thu Nov 19 16:13:28 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/karaf/decanter/elasticsearch/Activator.java  | 1 +
 .../org/apache/karaf/decanter/elasticsearch/EmbeddedNode.java    | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/a77b7a05/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/Activator.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/Activator.java
b/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/Activator.java
index 012ee11..022e0a5 100644
--- a/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/Activator.java
+++ b/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/Activator.java
@@ -78,6 +78,7 @@ public class Activator implements BundleActivator {
 					throw new ConfigurationException(null, message, e);
 				}
                 service.unregister();
+                node = null;
             }
         	
         	if (node == null) {

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/a77b7a05/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/EmbeddedNode.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/EmbeddedNode.java
b/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/EmbeddedNode.java
index 2a26332..f2cafd9 100644
--- a/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/EmbeddedNode.java
+++ b/elasticsearch/src/main/java/org/apache/karaf/decanter/elasticsearch/EmbeddedNode.java
@@ -125,10 +125,10 @@ public class EmbeddedNode {
     }
     
     private String getConfig(Dictionary<String, ?> config, Settings settings, String
key, String defaultValue) {
-    	if (config == null)
-    		return defaultValue;
     	if (settings != null && settings.get(key) != null)
     		defaultValue = settings.get(key);
+        if (config == null)
+            return defaultValue;
 		String value = (String) config.get(key);
 		return value != null ? value : defaultValue;
 	}


Mime
View raw message