Use Dictionary instead of Properties in OSGi services
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 21 Feb 2014 13:54:58 +0000 (13:54 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 21 Feb 2014 13:54:58 +0000 (13:54 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@6837 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/jcr/RemoteJcrAuthenticationProvider.java

index b32ba8ea9ab25d5cd49f5469e3971a2a1b9c9f2c..87208b2a32bf5d7a1bf8545fef22aa5fa2daa486 100644 (file)
@@ -16,8 +16,9 @@
 package org.argeo.security.jcr;
 
 import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Hashtable;
 import java.util.List;
-import java.util.Properties;
 
 import javax.jcr.Node;
 import javax.jcr.Repository;
@@ -64,12 +65,11 @@ public class RemoteJcrAuthenticationProvider implements AuthenticationProvider,
                        Repository repository = new RemoteJcrRepositoryWrapper(
                                        repositoryFactory, url, sp);
                        if (bundleContext != null) {
-                               Properties serviceProperties = new Properties();
-                               serviceProperties.setProperty(
-                                               ArgeoJcrConstants.JCR_REPOSITORY_ALIAS,
+                               Dictionary<String, String> serviceProperties = new Hashtable<String, String>();
+                               serviceProperties.put(ArgeoJcrConstants.JCR_REPOSITORY_ALIAS,
                                                ArgeoJcrConstants.ALIAS_NODE);
-                               serviceProperties.setProperty(
-                                               ArgeoJcrConstants.JCR_REPOSITORY_URI, url);
+                               serviceProperties
+                                               .put(ArgeoJcrConstants.JCR_REPOSITORY_URI, url);
                                bundleContext.registerService(Repository.class.getName(),
                                                repository, serviceProperties);
                        }