Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ChannelEndpointImpl.java7
1 files changed, 7 insertions, 0 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 933184a19..87896fba1 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 @@ public final class ChannelEndpointImpl implements ChannelEndpoint {
}
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(

Back to the top