FELIX-5155: cleanup possibly cached dependency callback instance when removing a dependency from an aspect or adapter component.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1722858 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java b/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java
index c86265c..570820e 100644
--- a/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java
+++ b/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/FilterComponent.java
@@ -160,6 +160,8 @@
                 }
             }
         }
+        // Cleanup possibly cached depenedncy callack instances.
+        m_dependencyCallbacks.remove((DependencyContext) dependency);
         return this;
     }