Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 1.8.4
-
Fix Version/s: 1.8.6, 2.0-beta-3
-
Component/s: GroovyDoc
-
Labels:
-
Environment:Fedora Linux 15, JDK 1.6
-
Number of attachments :
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
I updated the wiki page example and tested with 1.7 and 1.8.