Fix previous commit: do recursively invoke processXmlRpcResponse() on
contents of Maps.
This commit is contained in:
parent
37d086d5f3
commit
21c33be366
1 changed files with 10 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue