felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1729180 - /felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java
Date Mon, 08 Feb 2016 14:37:43 GMT
Author: pderop
Date: Mon Feb  8 14:37:43 2016
New Revision: 1729180

URL: http://svn.apache.org/viewvc?rev=1729180&view=rev
Log:
FELIX-5177: when we are losing a configuration, the dictionary is null, and we then should
pass a null configuration proxy to callbacks that accept a proxy config.

Modified:
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java?rev=1729180&r1=1729179&r2=1729180&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ConfigurationDependencyImpl.java
Mon Feb  8 14:37:43 2016
@@ -360,7 +360,10 @@ public class ConfigurationDependencyImpl
             if (m_configType != null) {
                 Object configurable;
                 try {
-                    configurable = Configurable.create(m_configType, settings);
+                    // if the configuration is null, it means we are losing it, and since
we pass a null dictionary for other callback
+                    // (that accepts a Dictionary), then we should have the same behavior
and also pass a null conf proxy object when
+                    // the configuration is lost.
+                    configurable = settings != null ? Configurable.create(m_configType, settings)
: null;
 
                     sigs = new Class[][] { { Dictionary.class }, { Component.class, Dictionary.class
}, { Component.class, m_configType }, { m_configType }, {} };
                     args = new Object[][] { { settings }, { m_component, settings }, { m_component,
configurable }, { configurable }, {} };



Mime
View raw message