Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Alexander Kuppe2013-10-22 15:31:18 +0000
committerMarkus Alexander Kuppe2013-10-22 15:31:18 +0000
commitb94960923f1e18a6722ca5327365b3d4cba1beb7 (patch)
tree20cddebe9b753d25589ed272467ae97f57e36501 /protocols/bundles/ch.ethz.iks.r_osgi.remote
parent1c721d9715664b587b0c3f9173d397bbc53617d1 (diff)
downloadorg.eclipse.ecf-b94960923f1e18a6722ca5327365b3d4cba1beb7.tar.gz
org.eclipse.ecf-b94960923f1e18a6722ca5327365b3d4cba1beb7.tar.xz
org.eclipse.ecf-b94960923f1e18a6722ca5327365b3d4cba1beb7.zip
[TCK][r-OSGi] NonSerializableException when running
remoteserviceadmin ct - Safeguard against older implementations speaking a broken wire protokol by sending an ArrayList instead of String[]
Diffstat (limited to 'protocols/bundles/ch.ethz.iks.r_osgi.remote')
-rw-r--r--protocols/bundles/ch.ethz.iks.r_osgi.remote/src/main/java/ch/ethz/iks/r_osgi/impl/ChannelEndpointImpl.java6
1 files changed, 6 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 28032bd49..6e1dfffb9 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
@@ -1053,6 +1053,12 @@ public final class ChannelEndpointImpl implements ChannelEndpoint {
switch (stateUpdate) {
case LeaseUpdateMessage.TOPIC_UPDATE: {
+ // There is an older r-OSGi version that incorrectly sends an ArrayList
+ // (1.0.0.RC4_v20131016-1848)
+ Object object = suMsg.getPayload()[0];
+ if (object instanceof List) {
+ object = ((List) object).toArray(new String[0]);
+ }
updateTopics((String[]) suMsg.getPayload()[0], (String[]) suMsg
.getPayload()[1]);
return null;

Back to the top