Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-JSR-6
-
None
-
None
-
WinXP (prof edn), Java jre1.5.0_07
Description
When using GPath expression with a complexly-keyed and -valued map, it expands out too much. An example:
m= [ ['a','b']:[2,34], ['c','d']:[2,16], ['e','f']:[3,97], ['g','h']:[4,48] ]
println m.entrySet().key //prints [a, b, g, h, e, f, c, d] instead of [[a, b], [g, h], [e, f], [c, d]]
println m.entrySet().value //prints [2, 34, 4, 48, 3, 97, 2, 16] instead of [[2, 34], [4, 48], [3, 97], [2, 16]]
Is this a bug or intended?
Note:
println m.entrySet() //prints [[a, b]=[2, 34], [g, h]=[4, 48], [e, f]=[3, 97], [c, d]=[2, 16]] which is OK