commit | d6974177e8a57716afe6fe2f598b23edda6c45f5 | [log] [tgz] |
---|---|---|
author | Markus Alexander Kuppe <bugs.eclipse.org@lemmster.de> | Sat Oct 26 13:06:52 2013 +0200 |
committer | Markus Alexander Kuppe <bugs.eclipse.org@lemmster.de> | Sat Oct 26 13:06:52 2013 +0200 |
tree | 8e0cde0ea60c5ff85b286bb7cb64c0f4abe74a42 | |
parent | eaff9f4fb8fb0f15a85429e3d59f65c4fbfb5bea [diff] |
NEW - bug 420433: [r-OSGi] NPE in ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.handleMessage(RemoteOSGiMessage) when SERVICE_MODIFIED received before SERVICE_ADDED https://bugs.eclipse.org/bugs/show_bug.cgi?id=420433
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 933184a..87896fb 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
@@ -1091,6 +1091,13 @@ } final RemoteServiceReferenceImpl ref = getRemoteReference(serviceURI); //$NON-NLS-1$ + // If r-OSGi receives a SERVICE_MODIFIED for service X before it + // knows about X (SERVICE_ADDED), there is no point in updating + // the local service instance. It will fail with an NPE anyway. + // (see https://bugs.eclipse.org/420433) + if (ref == null && reg == null) { + return null; + } ref.setProperties(properties); RemoteOSGiServiceImpl .notifyRemoteServiceListeners(new RemoteServiceEvent(