Fixed FELIX-3567

Create a copy of the dictionary object.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1352525 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java
index b5659f2..37e1b83 100644
--- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java
+++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurationHandler.java
@@ -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 @@
         // 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;
diff --git a/ipojo/tests/integration-tests/pom.xml b/ipojo/tests/integration-tests/pom.xml
index e954520..603df79 100644
--- a/ipojo/tests/integration-tests/pom.xml
+++ b/ipojo/tests/integration-tests/pom.xml
@@ -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>