Replace Properties usage by Dictionary when possible.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1520765 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicallyConfigurablePropertiesUsingConfigAdmin.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicallyConfigurablePropertiesUsingConfigAdmin.java
index f4a7561..6f78e6c 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicallyConfigurablePropertiesUsingConfigAdmin.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicallyConfigurablePropertiesUsingConfigAdmin.java
@@ -28,6 +28,7 @@
 import org.osgi.service.cm.ConfigurationAdmin;

 

 import java.io.IOException;

+import java.util.Dictionary;

 import java.util.Hashtable;

 import java.util.Properties;

 

@@ -85,7 +86,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", 2);

         conf.put("foo", "foo");

@@ -106,7 +107,6 @@
         assertEquals("Check baz equality -2", bazP, "zab");

     }

 

-

     @Test

     public void testStaticNoValue() throws IOException, InterruptedException {

         ServiceReference fooRef = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), instance2.getInstanceName());

@@ -125,7 +125,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", 2);

         conf.put("foo", "foo");

@@ -164,7 +164,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", 0);

@@ -214,7 +214,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", 0);

@@ -266,7 +266,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", "0");

@@ -317,7 +317,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "foo");

         conf.put("bar", 2);

@@ -368,7 +368,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "foo");

         conf.put("bar", new Integer(2));

diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManagedServiceConfigurableProperties.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManagedServiceConfigurableProperties.java
index 7a07108..6965fa6 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManagedServiceConfigurableProperties.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManagedServiceConfigurableProperties.java
@@ -24,16 +24,11 @@
 import org.junit.After;

 import org.junit.Before;

 import org.junit.Test;

-import org.osgi.framework.InvalidSyntaxException;

 import org.osgi.framework.ServiceReference;

-import org.osgi.service.cm.Configuration;

-import org.osgi.service.cm.ConfigurationAdmin;

 import org.osgi.service.cm.ConfigurationException;

 import org.osgi.service.cm.ManagedService;

-import org.ow2.chameleon.testing.helpers.IPOJOHelper;

-import org.ow2.chameleon.testing.helpers.OSGiHelper;

 

-import java.io.IOException;

+import java.util.Dictionary;

 import java.util.Hashtable;

 import java.util.Properties;

 

@@ -51,7 +46,6 @@
      * Instance where the ManagedServicePID is provided by the instance.

      */

     ComponentInstance instance2;

-

     /**

      * Instance without configuration.

      */

@@ -110,7 +104,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -148,7 +142,7 @@
 

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -188,7 +182,7 @@
 

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -228,7 +222,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -279,7 +273,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -330,7 +324,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -382,7 +376,7 @@
         assertNotNull("Check ManagedService availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", "0");

@@ -439,7 +433,7 @@
         assertNotNull("Check ManagedService availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", "0");

@@ -490,7 +484,7 @@
         assertNotNull("Check ManagedService availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "foo");

         conf.put("bar", new Integer(2));

@@ -539,7 +533,7 @@
         assertNotNull("Check ManagedService availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "foo");

         conf.put("bar", new Integer(2));

@@ -588,7 +582,7 @@
         assertNotNull("Check ManagedService availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "foo");

         conf.put("bar", new Integer(2));

diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndConfigAdmin.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndConfigAdmin.java
index 58f2cfc..60d99d8 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndConfigAdmin.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndConfigAdmin.java
@@ -26,21 +26,16 @@
 import org.junit.Test;

 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;

 import org.ops4j.pax.exam.spi.reactors.PerMethod;

-import org.osgi.framework.InvalidSyntaxException;

 import org.osgi.framework.ServiceReference;

 import org.osgi.service.cm.Configuration;

 import org.osgi.service.cm.ConfigurationAdmin;

-import org.osgi.service.cm.ConfigurationException;

-import org.osgi.service.cm.ManagedServiceFactory;

-import org.ow2.chameleon.testing.helpers.IPOJOHelper;

-import org.ow2.chameleon.testing.helpers.OSGiHelper;

 

 import java.io.IOException;

 import java.util.Dictionary;

 import java.util.Hashtable;

 import java.util.Properties;

 

-import static junit.framework.Assert.*;

+import static junit.framework.Assert.assertEquals;

 import static org.junit.Assert.assertNotNull;

 

 

@@ -93,7 +88,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -139,7 +134,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -186,7 +181,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -240,7 +235,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -297,7 +292,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", "0");

diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndManagedService.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndManagedService.java
index 6063eac..9968af5 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndManagedService.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndManagedService.java
@@ -22,24 +22,17 @@
 import org.apache.felix.ipojo.ComponentInstance;

 import org.apache.felix.ipojo.HandlerFactory;

 import org.apache.felix.ipojo.architecture.Architecture;

-import org.apache.felix.ipojo.extender.InstanceDeclaration;

 import org.apache.felix.ipojo.runtime.core.services.FooService;

 import org.junit.After;

 import org.junit.Before;

 import org.junit.Test;

 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;

-import org.ops4j.pax.exam.spi.reactors.PerClass;

 import org.ops4j.pax.exam.spi.reactors.PerMethod;

 import org.osgi.framework.Bundle;

 import org.osgi.framework.BundleContext;

-import org.osgi.framework.InvalidSyntaxException;

 import org.osgi.framework.ServiceReference;

-import org.osgi.service.cm.Configuration;

-import org.osgi.service.cm.ConfigurationAdmin;

 import org.osgi.service.cm.ConfigurationException;

 import org.osgi.service.cm.ManagedService;

-import org.ow2.chameleon.testing.helpers.IPOJOHelper;

-import org.ow2.chameleon.testing.helpers.OSGiHelper;

 

 import java.io.File;

 import java.io.FileOutputStream;

@@ -50,7 +43,8 @@
 import java.util.Hashtable;

 import java.util.Properties;

 

-import static junit.framework.Assert.*;

+import static junit.framework.Assert.assertEquals;

+import static junit.framework.Assert.fail;

 import static org.junit.Assert.assertNotNull;

 

 

@@ -120,7 +114,6 @@
     }

 

 

-

     @Test

     public void testStaticInstance1() throws IOException {

         for (Architecture architecture : osgiHelper.getServiceObjects(Architecture.class)) {

@@ -141,7 +134,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -188,7 +181,7 @@
 

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -251,7 +244,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -322,7 +315,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndConfigAdmin.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndConfigAdmin.java
index 46d588d..0e18118 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndConfigAdmin.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndConfigAdmin.java
@@ -22,19 +22,16 @@
 import org.apache.felix.ipojo.ComponentInstance;

 import org.apache.felix.ipojo.runtime.core.services.FooService;

 import org.junit.After;

-import org.junit.Assert;

 import org.junit.Before;

 import org.junit.Test;

 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;

 import org.ops4j.pax.exam.spi.reactors.PerMethod;

-import org.osgi.framework.InvalidSyntaxException;

 import org.osgi.framework.ServiceReference;

 import org.osgi.service.cm.Configuration;

 import org.osgi.service.cm.ConfigurationAdmin;

-import org.ow2.chameleon.testing.helpers.IPOJOHelper;

-import org.ow2.chameleon.testing.helpers.OSGiHelper;

 

 import java.io.IOException;

+import java.util.Dictionary;

 import java.util.Hashtable;

 import java.util.Properties;

 

@@ -91,7 +88,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -135,7 +132,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -180,7 +177,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -232,7 +229,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -286,7 +283,7 @@
                 getTestBundle().getLocation());

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", "0");

diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndManagedService.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndManagedService.java
index bc346fd..5608bb3 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndManagedService.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndManagedService.java
@@ -24,20 +24,16 @@
 import org.junit.After;

 import org.junit.Before;

 import org.junit.Test;

-import org.osgi.framework.InvalidSyntaxException;

 import org.osgi.framework.ServiceReference;

-import org.osgi.service.cm.Configuration;

-import org.osgi.service.cm.ConfigurationAdmin;

 import org.osgi.service.cm.ConfigurationException;

 import org.osgi.service.cm.ManagedService;

-import org.ow2.chameleon.testing.helpers.IPOJOHelper;

-import org.ow2.chameleon.testing.helpers.OSGiHelper;

 

-import java.io.IOException;

+import java.util.Dictionary;

 import java.util.Hashtable;

 import java.util.Properties;

 

-import static junit.framework.Assert.*;

+import static junit.framework.Assert.assertEquals;

+import static junit.framework.Assert.fail;

 import static org.junit.Assert.assertNotNull;

 

 

@@ -111,7 +107,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -153,7 +149,7 @@
 

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("bar", new Integer(2));

         conf.put("foo", "foo");

@@ -211,7 +207,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));

@@ -278,7 +274,7 @@
         assertNotNull("Check ManagedServiceFactory availability", msRef);

 

         // Configuration of baz

-        Properties conf = new Properties();

+        Dictionary<String, Object> conf = new Hashtable<String, Object>();

         conf.put("baz", "zab");

         conf.put("foo", "oof");

         conf.put("bar", new Integer(0));