diff options
author | Markus Alexander Kuppe | 2013-11-01 17:41:52 +0000 |
---|---|---|
committer | Markus Alexander Kuppe | 2013-11-01 17:41:52 +0000 |
commit | 7c37afa2382ac4db8976703bca54152a7d3710bf (patch) | |
tree | 93bbdd046d8b653be411d5f587aea622110ec7b6 /protocols/bundles/ch.ethz.iks.r_osgi.remote/src | |
parent | d6974177e8a57716afe6fe2f598b23edda6c45f5 (diff) | |
download | org.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.java | 14 |
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? } } |