Author: pauls
Date: Fri Jun 15 21:33:28 2018
New Revision: 1833625

URL: http://svn.apache.org/viewvc?rev=1833625&view=rev
Log:
FELIX-5800: fix a bug where we where using the wrong properties map.

Modified:
    
felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java

Modified: 
felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java?rev=1833625&r1=1833624&r2=1833625&view=diff
==============================================================================
--- 
felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
 (original)
+++ 
felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
 Fri Jun 15 21:33:28 2018
@@ -328,28 +328,28 @@ class ExtensionManager implements Conten
                 }
             }
         }
+
+        for (Map.Entry entry : defaultProperties.entrySet())
+        {
+            if (!config.containsKey(entry.getKey()))
+            {
+                config.put(entry.getKey(), entry.getValue());
+            }
+        }
+
         if(sysprops != null && 
"true".equalsIgnoreCase(felix._getProperty(FelixConstants.USE_PROPERTY_SUBSTITUTION_IN_SYSTEMPACKAGES))
 )
         {
-            defaultProperties.put(Constants.FRAMEWORK_SYSTEMPACKAGES, 
sysprops);
-            config.put(Constants.FRAMEWORK_SYSTEMPACKAGES, 
Util.getPropertyWithSubs(defaultProperties, 
Constants.FRAMEWORK_SYSTEMPACKAGES));
+            config.put(Constants.FRAMEWORK_SYSTEMPACKAGES, 
Util.getPropertyWithSubs(Util.toProperties(config), 
Constants.FRAMEWORK_SYSTEMPACKAGES));
         }
         else if (sysprops == null)
         {
-            config.put(Constants.FRAMEWORK_SYSTEMPACKAGES, 
Util.getPropertyWithSubs(defaultProperties, 
Constants.FRAMEWORK_SYSTEMPACKAGES));
+            config.put(Constants.FRAMEWORK_SYSTEMPACKAGES, 
Util.getPropertyWithSubs(Util.toProperties(config), 
Constants.FRAMEWORK_SYSTEMPACKAGES));
         }
 
         String syscaps = 
felix._getProperty(Constants.FRAMEWORK_SYSTEMCAPABILITIES);
         if(syscaps == null)
         {
-            config.put(Constants.FRAMEWORK_SYSTEMCAPABILITIES, 
Util.getPropertyWithSubs(defaultProperties, 
Constants.FRAMEWORK_SYSTEMCAPABILITIES));
-        }
-
-        for (Map.Entry entry : defaultProperties.entrySet())
-        {
-            if (!config.containsKey(entry.getKey()))
-            {
-                config.put(entry.getKey(), entry.getValue());
-            }
+            config.put(Constants.FRAMEWORK_SYSTEMCAPABILITIES, 
Util.getPropertyWithSubs(Util.toProperties(config), 
Constants.FRAMEWORK_SYSTEMCAPABILITIES));
         }
 
         m_systemBundleRevision.update(config);


Reply via email to