Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Alexander Kuppe2013-11-01 17:41:52 +0000
committerMarkus Alexander Kuppe2013-11-01 17:41:52 +0000
commit7c37afa2382ac4db8976703bca54152a7d3710bf (patch)
tree93bbdd046d8b653be411d5f587aea622110ec7b6 /protocols/bundles/ch.ethz.iks.r_osgi.remote/src
parentd6974177e8a57716afe6fe2f598b23edda6c45f5 (diff)
downloadorg.eclipse.ecf-7c37afa2382ac4db8976703bca54152a7d3710bf.tar.gz
org.eclipse.ecf-7c37afa2382ac4db8976703bca54152a7d3710bf.tar.xz
org.eclipse.ecf-7c37afa2382ac4db8976703bca54152a7d3710bf.zip
bug 420897: [r-OSGi] NPE when trying to uninstall the proxy bundle
https://bugs.eclipse.org/bugs/show_bug.cgi?id=420897
Diffstat (limited to 'protocols/bundles/ch.ethz.iks.r_osgi.remote/src')
-rw-r--r--protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ChannelEndpointImpl.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ChannelEndpointImpl.java b/protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ChannelEndpointImpl.java
index 87896fba1..85acd857e 100644
--- a/protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ChannelEndpointImpl.java
+++ b/protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ChannelEndpointImpl.java
@@ -962,9 +962,19 @@ public final class ChannelEndpointImpl implements ChannelEndpoint {
*/
void ungetRemoteService(final URI uri) {
try {
- ((Bundle) proxyBundles.remove(uri.getFragment())).uninstall();
+ Bundle bundle = (Bundle) proxyBundles.remove(uri.getFragment());
+ // see https://bugs.eclipse.org/420897
+ if (bundle != null) {
+ bundle.uninstall();
+ } else {
+ RemoteOSGiServiceImpl.log
+ .log(LogService.LOG_WARNING,
+ "failed to uninstall non-existant bundle " + uri.getFragment()); //$NON-NLS-1$
+ }
} catch (final BundleException be) {
-
+ // TODO Could a BE indicate that the old proxy bundle (which failed
+ // to uninstall) will prevent future proxy bundles from
+ // installing/resolving?
}
}

Back to the top