commit | fd90eda7d7a23327a61aa4c495cc5c94487fe878 | [log] [tgz] |
---|---|---|
author | Pierre De Rop <pderop@apache.org> | Thu Dec 31 09:06:08 2015 +0000 |
committer | Pierre De Rop <pderop@apache.org> | Thu Dec 31 09:06:08 2015 +0000 |
tree | df44cf89c8ae9044cf29a1c859f7b04f314e2673 | |
parent | b44a1637054c1f8681764a762e4ebb6e45647a69 [diff] |
FELIX-5153: DM4 calls stop before ungetService() on ServiceFactory components. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1722429 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java b/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java index 2a9293b..3d7aefe 100644 --- a/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java +++ b/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
@@ -1308,7 +1308,7 @@ private void unregisterService() { if (m_serviceName != null && m_registration != null) { try { - if (m_bundle != null && m_bundle.getState() == Bundle.ACTIVE) { + if (m_bundle != null && (m_bundle.getState() == Bundle.ACTIVE || m_bundle.getState() == Bundle.STOPPING)) { m_registration.unregister(); } } catch (IllegalStateException e) { /* Should we really log this ? */}