Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
1.8.4
-
Fedora Linux 15, JDK 1.6
Description
One of the examples from http://groovy.codehaus.org/JN0025-Starting is incorrect.
def x= ['a', 'b', 'c'] as Integer[] //convert each item in list to an Integer
assert x[0] == 97 && x[1] == 98 && x[2] == 99 //access each element individually
It causes java.lang.NumberFormatException: For input string: "a"
There's also a related ticket already: GROOVY-4602