FELIX-3622 Use the local variable pid to log the service PID of the configuration added instead of accessing the raw dictionary which has the property removed after calling the ConfigurationImpl constructor.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1369807 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
index b0d1ba4..2de393a 100644
--- a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
+++ b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
@@ -646,10 +646,10 @@
             Enumeration configs = pmList[i].getDictionaries();
             while ( configs.hasMoreElements() )
             {
-                Dictionary config = ( Dictionary ) configs.nextElement();
+                final Dictionary config = ( Dictionary ) configs.nextElement();
 
                 // ignore non-Configuration dictionaries
-                String pid = ( String ) config.get( Constants.SERVICE_PID );
+                final String pid = ( String ) config.get( Constants.SERVICE_PID );
                 if ( pid == null )
                 {
                     continue;
@@ -663,7 +663,7 @@
                         LogService.LOG_DEBUG,
                         "Omitting configuration {0}: No permission for bundle {1} on configuration bound to {2}",
                         new Object[]
-                            { config.get( Constants.SERVICE_PID ), configurationAdmin.getBundle().getLocation(),
+                            { pid, configurationAdmin.getBundle().getLocation(),
                                 config.get( ConfigurationAdmin.SERVICE_BUNDLELOCATION ) } );
                     continue;
                 }
@@ -682,17 +682,17 @@
                     if ( !cfg.isNew() )
                     {
                         log( LogService.LOG_DEBUG, "Adding configuration {0}", new Object[]
-                            { config.get( Constants.SERVICE_PID ) } );
+                            { pid } );
                         configList.add( cfg );
                     }
                     else
                     {
                         log( LogService.LOG_DEBUG, "Omitting configuration {0}: Is new", new Object[]
-                            { config.get( Constants.SERVICE_PID ) } );
+                            { pid } );
                     }
                 } else {
                     log( LogService.LOG_DEBUG, "Omitting configuration {0}: Does not match filter", new Object[]
-                        { config.get( Constants.SERVICE_PID ) } );
+                        { pid } );
                 }
             }
         }