added the same optimization I added to resource adapters to the aspect and adapter
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@891750 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterImpl.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterImpl.java
index 468e39c..d79023b 100644
--- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterImpl.java
+++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterImpl.java
@@ -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.service.Service;
@@ -64,11 +65,13 @@
props.put(key, m_adapterProperties.get(key));
}
}
+ List dependencies = m_service.getDependencies();
+ 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.createServiceDependency()
.setService(m_serviceInterface, ref)
.setRequired(true)
@@ -78,7 +81,7 @@
return m_manager.createService()
.setInterface((String[]) m_adapterInterface, props)
.setImplementation(m_adapterImplementation)
- .add(m_service.getDependencies())
+ .add(dependencies)
.add(m_manager.createServiceDependency()
.setService(m_serviceInterface, ref)
.setRequired(true)
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AspectImpl.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AspectImpl.java
index 94e97d8..29fa6b3 100644
--- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AspectImpl.java
+++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AspectImpl.java
@@ -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.service.Service;
@@ -54,10 +55,12 @@
props.put(key, m_aspectProperties.get(key));
}
}
+ List dependencies = m_service.getDependencies();
+ dependencies.remove(0);
return m_manager.createService()
.setInterface(m_serviceInterface.getName(), props)
.setImplementation(m_aspectImplementation)
- .add(m_service.getDependencies())
+ .add(dependencies)
.add(m_manager.createServiceDependency()
.setService(m_serviceInterface, ref)
.setRequired(true));