karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [4/4] git commit: [KARAF-2888] Make sure the FeaturesService configuration uses property substitution
Date Wed, 23 Apr 2014 13:49:19 GMT
[KARAF-2888] Make sure the FeaturesService configuration uses property substitution


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

Branch: refs/heads/master
Commit: 96a0920c6c3bb0cbf7fe778b92b4d33ae4fb29bc
Parents: bc05096
Author: Guillaume Nodet <gnodet@gmail.com>
Authored: Wed Apr 23 15:29:57 2014 +0200
Committer: Guillaume Nodet <gnodet@gmail.com>
Committed: Wed Apr 23 15:48:57 2014 +0200

----------------------------------------------------------------------
 features/core/pom.xml                                       | 1 +
 .../org/apache/karaf/features/internal/osgi/Activator.java  | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/96a0920c/features/core/pom.xml
----------------------------------------------------------------------
diff --git a/features/core/pom.xml b/features/core/pom.xml
index 52500d8..a6f9d1b 100644
--- a/features/core/pom.xml
+++ b/features/core/pom.xml
@@ -132,6 +132,7 @@
                             org.apache.karaf.features.internal.*,
                             org.apache.felix.resolver,
                             org.apache.felix.utils.version,
+                            org.apache.felix.utils.properties,
                             org.apache.felix.utils.manifest,
                             org.apache.karaf.util.collections,
                             org.apache.karaf.util.json,

http://git-wip-us.apache.org/repos/asf/karaf/blob/96a0920c/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
b/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
index de6b44d..95665fa 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java
@@ -27,9 +27,10 @@ import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.Hashtable;
 import java.util.List;
-import java.util.Properties;
+import java.util.Map;
 
 import org.apache.felix.resolver.ResolverImpl;
+import org.apache.felix.utils.properties.Properties;
 import org.apache.karaf.features.FeaturesListener;
 import org.apache.karaf.features.FeaturesService;
 import org.apache.karaf.features.internal.repository.AggregateRepository;
@@ -93,7 +94,11 @@ public class Activator extends BaseActivator {
                 logger.warn("Error reading configuration file " + configFile.toString(),
e);
             }
         }
-        updated((Dictionary) configuration);
+        Dictionary<String, String> props = new Hashtable<String, String>();
+        for (Map.Entry<String, String> entry : configuration.entrySet()) {
+            props.put(entry.getKey(), entry.getValue());
+        }
+        updated(props);
     }
 
     protected void doStart() throws Exception {


Mime
View raw message