You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2011/02/02 10:28:17 UTC

svn commit: r1066388 - /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java

Author: clement
Date: Wed Feb  2 09:28:17 2011
New Revision: 1066388

URL: http://svn.apache.org/viewvc?rev=1066388&view=rev
Log:
FELIX-2818
When fileinstall checks if a configuration exists, instead of an empty hastable, return null.

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java?rev=1066388&r1=1066387&r2=1066388&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java (original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java Wed Feb  2 09:28:17 2011
@@ -221,10 +221,12 @@ public class ConfigInstaller implements 
         Configuration config = getConfiguration(toConfigKey(f), pid[0], pid[1]);
 
         Dictionary props = config.getProperties();
-        Hashtable old = props != null ? new Hashtable(new DictionaryAsMap(props)) : new Hashtable();
-        old.remove( DirectoryWatcher.FILENAME );
-        old.remove( Constants.SERVICE_PID );
-        old.remove( ConfigurationAdmin.SERVICE_FACTORYPID );
+        Hashtable old = props != null ? new Hashtable(new DictionaryAsMap(props)) : null;
+        if (old != null) {
+        	old.remove( DirectoryWatcher.FILENAME );
+        	old.remove( Constants.SERVICE_PID );
+        	old.remove( ConfigurationAdmin.SERVICE_FACTORYPID );
+        }
 
         if( !ht.equals( old ) )
         {