Fix previous commit: do recursively invoke processXmlRpcResponse() on

contents of Maps.
This commit is contained in:
hns 2004-02-18 12:53:54 +00:00
parent 37d086d5f3
commit 21c33be366

View file

@ -511,7 +511,7 @@ public final class RhinoCore {
if (what instanceof NativeObject) {
NativeObject no = (NativeObject) what;
Object[] ids = no.getIds();
Hashtable ht = new Hashtable(ids.length);
Hashtable ht = new Hashtable(ids.length*2);
for (int i=0; i<ids.length; i++) {
if (ids[i] instanceof String) {
String key = (String) ids[i];
@ -533,7 +533,13 @@ public final class RhinoCore {
what = retval;
} else if (what instanceof Map) {
Map map = (Map) what;
what = new Hashtable(map);
Hashtable ht = new Hashtable(map.size()*2);
for (Iterator it=map.entrySet().iterator(); it.hasNext();) {
Map.Entry entry = (Map.Entry) it.next();
ht.put(entry.getKey().toString(),
processXmlRpcResponse(entry.getValue()));
}
what = ht;
} else if (what instanceof Number) {
Number n = (Number) what;
if (what instanceof Float || what instanceof Long) {