Message3651
The problem was that PyDictionary was checking if the argument it was
passed had a 'keys' method and then calling it and iterating them.
Hashtable has a keys method, but HashMap and the Map interface have a
'keySet' method. If a keys method doesn't exist, PyDictionary iterates
the argument for key-value pairs. However, iterating HashMap produces
the keys, not the key-value pairs. Since strings in python are iterable
and support __len__, PyDictionary was complaining that it wasn't the
right length, ie a pair.
I've attached a patch to check if the object supports the keySet method,
and use that instead of the keys method. I also added a bugtest. |
|
Date |
User |
Action |
Args |
2008-10-10 22:32:40 | rnk | set | messageid: <1223677960.66.0.411167265787.issue1146@psf.upfronthosting.co.za> |
2008-10-10 22:32:40 | rnk | set | recipients:
+ rnk, bupjae |
2008-10-10 22:32:40 | rnk | link | issue1146 messages |
2008-10-10 22:32:40 | rnk | create | |
|