commit | c34d12f5297bbd7264bc1a1e51752c07e379fb00 | [log] [tgz] |
---|---|---|
author | David Jencks <djencks@apache.org> | Wed Sep 26 16:23:54 2012 +0000 |
committer | David Jencks <djencks@apache.org> | Wed Sep 26 16:23:54 2012 +0000 |
tree | 0b099804035d25a1e1201a01afa34ffc171cd1ec | |
parent | 112209ad7ac6b992dde0b2a94444c0943ae28a8f [diff] |
FELIX-3681 discard dependency map when we discard the implementation object git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1390591 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java index 80cd8f0..f773a20 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
@@ -856,6 +856,11 @@ return m_dependencies_map.compareAndSet( old, newDeps ); } + protected void unsetDependencyMap() + { + m_dependencies_map.set( null ); + } + private void returnServices( Map deps ) { for (Iterator it = deps.values().iterator(); it.hasNext(); ) @@ -1385,7 +1390,7 @@ { acm.deleteComponent( reason ); acm.deactivateDependencyManagers(); - acm.m_dependencies_map.set( null ); + acm.unsetDependencyMap(); } finally {
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java index 543de5c..165ffbc 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java
@@ -692,6 +692,7 @@ if ( m_useCount == 0 ) { state().ungetService( this ); + unsetDependencyMap(); } } finally
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java index 2666249..0c39e39 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java
@@ -186,6 +186,7 @@ if ( serviceContexts.isEmpty() && getState() == STATE_ACTIVE ) { changeState( Registered.getInstance() ); + unsetDependencyMap(); } } finally