diff options
author | Matthew Johnson <mjj29@hecate.trinhall.cam.ac.uk> | 2007-01-11 10:59:34 +0000 |
---|---|---|
committer | Matthew Johnson <mjj29@hecate.trinhall.cam.ac.uk> | 2007-01-11 10:59:34 +0000 |
commit | 154a51bc8f5eec7a0e19b0bdb5bc4d5c329d1432 (patch) | |
tree | a48cddf840766bdcf8318563aefd1d367b1aa197 | |
parent | e0de1f29ac286a3887e2953c2885742e1694f029 (diff) |
fix cross-test-client
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | changelog | 4 | ||||
-rw-r--r-- | debug.conf | 24 | ||||
-rw-r--r-- | org/freedesktop/dbus/test/cross_test_client.java | 17 |
4 files changed, 31 insertions, 18 deletions
@@ -40,8 +40,8 @@ JAVAUNIXJARDIR?=/usr/share/java DEBUG=disable # Version numbering -VERSION = 2.1 -RELEASEVERSION = 2.0 +VERSION = 2.2 +RELEASEVERSION = 2.1 DISTFILES=dbus-java.tex Makefile org tmp-session.conf CreateInterface.sgml DBusDaemon.sgml ListDBus.sgml DBusViewer.sgml changelog AUTHORS COPYING README INSTALL CreateInterface.sh DBusDaemon.sh ListDBus.sh DBusViewer.sh DBusDaemon.bat CreateInterface.bat ListDBus.bat DBusViewer.bat compile.bat @@ -1,3 +1,7 @@ +Version 2.2: + + * Fix cross-test to pass. + Version 2.1: * make scripts with $JAVA @@ -1,26 +1,26 @@ -org.freedesktop.dbus.MessageReader = VERBOSE -org.freedesktop.dbus.MessageWriter = VERBOSE +org.freedesktop.dbus.MessageReader = ERR +org.freedesktop.dbus.MessageWriter = ERR org.freedesktop.dbus.Message = ERR org.freedesktop.dbus.MethodCall = ERR org.freedesktop.dbus.MethodTuple = ERR -org.freedesktop.dbus.AbstractConnection = VERBOSE -org.freedesktop.dbus.AbstractConnection$_thread = VERBOSE +org.freedesktop.dbus.AbstractConnection = ERR +org.freedesktop.dbus.AbstractConnection$_thread = ERR org.freedesktop.dbus.AbstractConnection$_sender = ERR org.freedesktop.dbus.DirectConnection = ERR org.freedesktop.dbus.DBusConnection = ERR org.freedesktop.dbus.AbstractConnection$1 = ERR org.freedesktop.dbus.DBusSignal = ERR org.freedesktop.dbus.EfficientQueue = ERR -org.freedesktop.dbus.Transport = VERBOSE -org.freedesktop.dbus.Transport$SASL = VERBOSE +org.freedesktop.dbus.Transport = ERR +org.freedesktop.dbus.Transport$SASL = ERR org.freedesktop.dbus.Transport$SASL$Command = ERR org.freedesktop.dbus.Marshalling = ERR -org.freedesktop.dbus.BusAddress = VERBOSE +org.freedesktop.dbus.BusAddress = ERR org.freedesktop.dbus.RemoteInvocationHandler = ERR org.freedesktop.dbus.test.cross_test_client = ERR; -org.freedesktop.dbus.bin.DBusDaemon = VERBOSE -org.freedesktop.dbus.bin.DBusDaemon$DBusServer = VERBOSE -org.freedesktop.dbus.bin.DBusDaemon$Sender = VERBOSE -org.freedesktop.dbus.bin.DBusDaemon$Reader = VERBOSE -org.freedesktop.dbus.bin.DBusDaemon$MagicMap = VERBOSE +org.freedesktop.dbus.bin.DBusDaemon = ERR +org.freedesktop.dbus.bin.DBusDaemon$DBusServer = ERR +org.freedesktop.dbus.bin.DBusDaemon$Sender = ERR +org.freedesktop.dbus.bin.DBusDaemon$Reader = ERR +org.freedesktop.dbus.bin.DBusDaemon$MagicMap = ERR ALL=ERR diff --git a/org/freedesktop/dbus/test/cross_test_client.java b/org/freedesktop/dbus/test/cross_test_client.java index d7da1f9..59c5c08 100644 --- a/org/freedesktop/dbus/test/cross_test_client.java +++ b/org/freedesktop/dbus/test/cross_test_client.java @@ -190,10 +190,14 @@ public class cross_test_client implements DBus.Binding.TestCallbacks, DBusSigHan if (t instanceof ParameterizedType) { Class c = (Class) ((ParameterizedType) t).getRawType(); if (List.class.isAssignableFrom(c)) { - Object[] os = ((List) a).toArray(); + Object os; + if (a instanceof List) + os = ((List) a).toArray(); + else + os = a; Type[] ts = ((ParameterizedType) t).getActualTypeArguments(); - for (int i = 0; i < os.length; i++) - vs.addAll(PrimitizeRecurse(os[i], ts[0])); + for (int i = 0; i < Array.getLength(os); i++) + vs.addAll(PrimitizeRecurse(Array.get(os, i), ts[0])); } else if (Map.class.isAssignableFrom(c)) { Object[] os = ((Map) a).keySet().toArray(); Object[] ks = ((Map) a).values().toArray(); @@ -212,7 +216,12 @@ public class cross_test_client implements DBus.Binding.TestCallbacks, DBusSigHan vs.addAll(PrimitizeRecurse(((Variant) a).getValue(), ((Variant) a).getType())); } } else if (Variant.class.isAssignableFrom((Class) t)) - vs.addAll(PrimitizeRecurse(((Variant) a).getValue(), ((Variant) a).getType())); + vs.addAll(PrimitizeRecurse(((Variant) a).getValue(), ((Variant) a).getType())); + else if (t instanceof Class && ((Class) t).isArray()) { + Type t2 = ((Class) t).getComponentType(); + for (int i = 0; i < Array.getLength(a); i++) + vs.addAll(PrimitizeRecurse(Array.get(a, i), t2)); + } else vs.add(new Variant(a)); return vs; |