Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
def x = [a:1, b:2, c:3]
x.entrySet.each
println x
- Prints [a:1, b:2, c:3] – would expect it to print [a:1, b:4, c:9], or to explode.
- Instead of either updating or exploding, it silently fails.
- Note: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html#entrySet() – the entrySet is explicitly backed by the map,
- and by requirement of the Java API, changes to the entrySet must be reflected in the underlying map.