Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Alexander Kuppe2013-10-26 11:06:52 +0000
committerMarkus Alexander Kuppe2013-10-26 11:06:52 +0000
commitd6974177e8a57716afe6fe2f598b23edda6c45f5 (patch)
tree8e0cde0ea60c5ff85b286bb7cb64c0f4abe74a42 /protocols
parenteaff9f4fb8fb0f15a85429e3d59f65c4fbfb5bea (diff)
downloadorg.eclipse.ecf-d6974177e8a57716afe6fe2f598b23edda6c45f5.tar.gz
org.eclipse.ecf-d6974177e8a57716afe6fe2f598b23edda6c45f5.tar.xz
org.eclipse.ecf-d6974177e8a57716afe6fe2f598b23edda6c45f5.zip
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
Diffstat (limited to 'protocols')
-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