summaryrefslogtreecommitdiff
path: root/org
diff options
context:
space:
mode:
authorMatthew Johnson <mjj29@qadesh.matthew.ath.cx>2009-11-01 10:27:43 +0000
committerMatthew Johnson <mjj29@qadesh.matthew.ath.cx>2009-11-01 10:27:43 +0000
commit26611dabfea24bd4b51617c14d7f939c609c5260 (patch)
tree26faecd55bac275ecdcdbf755cc7960d5d79b732 /org
parent5da8b06b2c3f5520e7fc505eb8eb34f79688ebc1 (diff)
fix lack of recursive deserialization of maps
Diffstat (limited to 'org')
-rw-r--r--org/freedesktop/dbus/DBusMap.java2
-rw-r--r--org/freedesktop/dbus/Marshalling.java9
2 files changed, 10 insertions, 1 deletions
diff --git a/org/freedesktop/dbus/DBusMap.java b/org/freedesktop/dbus/DBusMap.java
index 2ac65f1..b9d06d7 100644
--- a/org/freedesktop/dbus/DBusMap.java
+++ b/org/freedesktop/dbus/DBusMap.java
@@ -20,7 +20,7 @@ import java.util.Vector;
class DBusMap<K, V> implements Map<K, V>
{
- private Object[][] entries;
+ Object[][] entries;
public DBusMap(Object[][] entries)
{
this.entries=entries;
diff --git a/org/freedesktop/dbus/Marshalling.java b/org/freedesktop/dbus/Marshalling.java
index 7f6797c..06c9a8c 100644
--- a/org/freedesktop/dbus/Marshalling.java
+++ b/org/freedesktop/dbus/Marshalling.java
@@ -518,6 +518,15 @@ public class Marshalling
o.getClass());
}
}
+ if (parameter instanceof DBusMap) {
+ if (Debug.debug) Debug.print(Debug.VERBOSE, "Deserializing a Map");
+ DBusMap dmap = (DBusMap) parameter;
+ Type[] maptypes = ((ParameterizedType) type).getActualTypeArguments();
+ for (int i = 0; i < dmap.entries.length; i++) {
+ dmap.entries[i][0] = deSerializeParameter(dmap.entries[i][0], maptypes[0], conn);
+ dmap.entries[i][1] = deSerializeParameter(dmap.entries[i][1], maptypes[1], conn);
+ }
+ }
return parameter;
}
static List<Object> deSerializeParameters(List<Object> parameters, Type type, AbstractConnection conn) throws Exception