Author Login
Post Reply
According to:
http://groovy.codehaus.org/groovy-jdk/java/util/Map.html#putAt%28K,%20V%29
the putAt method of Map "Returns: the value corresponding to the given
key"
(The putAt method supposedly supports the left-hand-side assignment with
subscript operator)
However, in this code:
def mymap= [one:1]
assert (mymap['one']= '111' == '111') // OK!
assert (mymap.putAt('one', '111') == '111') // WRONG!
assert (mymap.putAt('one', '111') == null) // putAt actually returs
null!
This has been tested with Groovy 1.7.0 and 1.5.6 (the two version I
have), so I guess it happens in all versions in between and has been
happening for a long time. Nobody cared? Is it a bug in Groovy or a
documentation error, or maybe I'm not interpreting things as I should?
--
BBB
iPhone Games? Need a challenge?
http://tridefense.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email