felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r987867 - /felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java
Date Sun, 22 Aug 2010 11:31:57 GMT
Author: pderop
Date: Sun Aug 22 11:31:56 2010
New Revision: 987867

URL: http://svn.apache.org/viewvc?rev=987867&view=rev
Log:
fixed initialization of the ResourceDependency with respect to propagate parameters. This
fix is validated by the ResourceAdapterServiceTestWithPublisher testcase

Modified:
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java?rev=987867&r1=987866&r2=987867&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java
Sun Aug 22 11:31:56 2010
@@ -100,12 +100,14 @@ public class ResourceAdapterServiceImpl 
             dependencies.remove(0);
             ResourceDependency resourceDependency = m_manager.createResourceDependency()
                  .setResource(resource)
-                 .setPropagate(m_propagate)
                  .setCallbacks(m_callbackInstance, null, m_callbackChanged, null)
                  .setAutoConfig(true)
                  .setRequired(true);
-            resourceDependency.setPropagate(m_propagate);
-            resourceDependency.setPropagate(m_propagateCallbackInstance, m_propagateCallbackMethod);
+            if (m_propagateCallbackInstance != null && m_propagateCallbackMethod
!= null) {
+                resourceDependency.setPropagate(m_propagateCallbackInstance, m_propagateCallbackMethod);
+            } else {
+                resourceDependency.setPropagate(m_propagate);
+            }
             Service service = m_manager.createService()
                 .setInterface(m_serviceInterfaces, props)
                 .setImplementation(m_serviceImpl)



Mime
View raw message