felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1352525 - in /felix/trunk/ipojo: runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java tests/integration-tests/pom.xml
Date Thu, 21 Jun 2012 13:18:08 GMT
Author: clement
Date: Thu Jun 21 13:18:08 2012
New Revision: 1352525

URL: http://svn.apache.org/viewvc?rev=1352525&view=rev
Log:
Fixed FELIX-3567

Create a copy of the dictionary object.

Modified:
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java
    felix/trunk/ipojo/tests/integration-tests/pom.xml

Modified: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java?rev=1352525&r1=1352524&r2=1352525&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java
(original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java
Thu Jun 21 13:18:08 2012
@@ -18,11 +18,7 @@
  */
 package org.apache.felix.ipojo.handlers.configuration;
 
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Properties;
+import java.util.*;
 
 import org.apache.felix.ipojo.ConfigurationException;
 import org.apache.felix.ipojo.HandlerFactory;
@@ -223,7 +219,16 @@ public class ConfigurationHandler extend
         // Check if the component is dynamically configurable
         // Propagation enabled by default.
         m_mustPropagate = true;
-        m_toPropagate = configuration; // Instance configuration to propagate.
+        // We must create a copy as the Config Admin dictionary has some limitation
+        m_toPropagate = new Properties();
+        if (configuration != null) {
+            Enumeration keys = configuration.keys();
+            while (keys.hasMoreElements()) {
+                String key = (String) keys.nextElement();
+                m_toPropagate.put(key, configuration.get(key));
+            }
+        }
+
         String propa = confs[0].getAttribute("propagation");
         if (propa != null && propa.equalsIgnoreCase("false")) {
             m_mustPropagate = false;

Modified: felix/trunk/ipojo/tests/integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/integration-tests/pom.xml?rev=1352525&r1=1352524&r2=1352525&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/integration-tests/pom.xml (original)
+++ felix/trunk/ipojo/tests/integration-tests/pom.xml Thu Jun 21 13:18:08 2012
@@ -272,22 +272,14 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.configadmin</artifactId>
-            <version>1.2.4</version>
+            <version>1.2.8</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+             <groupId>ipojo.tests</groupId>
+             <artifactId>tests.core.configadmin</artifactId>
+             <version>${ipojo.core.snapshot}</version>
+             <scope>test</scope>
+         </dependency>
     </dependencies>
-
-    <profiles>
-        <profile>
-            <id>configadmin</id>
-            <dependencies>
-                <dependency>
-                    <groupId>ipojo.tests</groupId>
-                    <artifactId>tests.core.configadmin</artifactId>
-                    <version>${ipojo.core.snapshot}</version>
-                    <scope>test</scope>
-                </dependency>
-            </dependencies>
-        </profile>
-    </profiles>
 </project>



Mime
View raw message