You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cs...@apache.org on 2019/05/16 12:16:40 UTC

[aries-rsa] branch master updated: ARIES-1907 - Fix IllegalStateException when stopping bundle

This is an automated email from the ASF dual-hosted git repository.

cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-rsa.git


The following commit(s) were added to refs/heads/master by this push:
     new 540999b  ARIES-1907 - Fix IllegalStateException when stopping bundle
     new 7a70c2c  Merge pull request #24 from amichair/ARIES-1907
540999b is described below

commit 540999b50122b0ba47fdc5762feab0dd2282ff03
Author: Amichai Rothman <am...@amichais.net>
AuthorDate: Tue May 14 10:06:08 2019 +0300

    ARIES-1907 - Fix IllegalStateException when stopping bundle
---
 .../java/org/apache/aries/rsa/core/RemoteServiceAdminFactory.java    | 2 +-
 .../java/org/apache/aries/rsa/core/RemoteServiceAdminInstance.java   | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminFactory.java b/rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminFactory.java
index 92c189b..ef64adf 100644
--- a/rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminFactory.java
+++ b/rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminFactory.java
@@ -46,6 +46,6 @@ public class RemoteServiceAdminFactory implements ServiceFactory<RemoteServiceAd
                                           RemoteServiceAdmin serviceObject) {
         LOG.debug("RemoteServiceAdmin ServiceInstance removed for Bundle {}", b.getSymbolicName());
         instances--;
-        ((RemoteServiceAdminInstance)serviceObject).close(instances == 0);
+        ((RemoteServiceAdminInstance)serviceObject).close(b, instances == 0);
     }
 }
diff --git a/rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminInstance.java b/rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminInstance.java
index 7158f52..a5e8135 100644
--- a/rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminInstance.java
+++ b/rsa/src/main/java/org/apache/aries/rsa/core/RemoteServiceAdminInstance.java
@@ -25,6 +25,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
@@ -78,9 +79,9 @@ public class RemoteServiceAdminInstance implements RemoteServiceAdmin {
         });
     }
 
-    public void close(boolean closeAll) {
+    public void close(Bundle bundle, boolean closeAll) {
         closed = true;
-        rsaCore.removeExportRegistrations(bctx.getBundle());
+        rsaCore.removeExportRegistrations(bundle);
         if (closeAll) {
             rsaCore.close();
         }