commit | 037f20cbbc39dec68b697655cee0f0efea209beb | [log] [tgz] |
---|---|---|
author | David Jencks <djencks@apache.org> | Thu Jul 18 00:43:21 2013 +0000 |
committer | David Jencks <djencks@apache.org> | Thu Jul 18 00:43:21 2013 +0000 |
tree | b4f2495be57d4b063b1e2f37a2749fec5f7d33df | |
parent | 647e107ddbfc7350385d69a66134ce910a8df5f0 [diff] |
FELIX-4171 don't try to close DependencyManagers we didn't open git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1504336 13f79535-47bb-0310-9956-ffa450edef68
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 0f9c91d..ff31830 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
@@ -270,10 +270,17 @@ new Object[] {dm.getName()}, null ); - // make sure, we keep no bindings + // make sure, we keep no bindings. Only close the dm's we opened. + boolean skip = true; for ( DependencyManager md: getReversedDependencyManagers() ) { - md.close( implementationObject, componentContext.getEdgeInfo( md ) ); + if ( skip && dm == md ) { + skip = false; + } + if ( !skip ) + { + md.close( implementationObject, componentContext.getEdgeInfo( md ) ); + } } setter.resetImplementationObject( implementationObject );