felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r891746 - /felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java
Date Thu, 17 Dec 2009 15:03:24 GMT
Author: marrs
Date: Thu Dec 17 15:03:16 2009
New Revision: 891746

URL: http://svn.apache.org/viewvc?rev=891746&view=rev
Log:
removed a duplicate dependency for resource adapters, where only the most strict one now remains

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

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java?rev=891746&r1=891745&r2=891746&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java
Thu Dec 17 15:03:16 2009
@@ -20,6 +20,7 @@
 
 import java.util.Dictionary;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.Properties;
 
 import org.apache.felix.dm.resources.Resource;
@@ -59,11 +60,15 @@
                 props.put(key, m_adapterProperties.get(key));
             }
         }
+        List dependencies = m_service.getDependencies();
+        // the first dependency is always the dependency on the resource, which
+        // will be replaced with a more specific dependency below
+        dependencies.remove(0);
         if (m_adapterInterface instanceof String) {
             return m_manager.createService()
                 .setInterface((String) m_adapterInterface, props)
                 .setImplementation(m_adapterImplementation)
-                .add(m_service.getDependencies())
+                .add(dependencies)
                 .add(m_manager.createResourceDependency()
                     .setResource(resource)
                     .setPropagate(m_propagate)
@@ -74,7 +79,7 @@
             return m_manager.createService()
                 .setInterface((String[]) m_adapterInterface, props)
                 .setImplementation(m_adapterImplementation)
-                .add(m_service.getDependencies())
+                .add(dependencies)
                 .add(m_manager.createResourceDependency()
                     .setResource(resource)
                     .setPropagate(m_propagate)



Mime
View raw message