groovy
  1. groovy
  2. GROOVY-5130

Documentation: Error for one of the examples from JN0025-Starting

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Trivial 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 :
      0

      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

        Activity

        Hide
        John Wagenleitner added a comment -

        I updated the wiki page example and tested with 1.7 and 1.8.

        Show
        John Wagenleitner added a comment - I updated the wiki page example and tested with 1.7 and 1.8.
        Hide
        Paul King added a comment -

        Documentation fixed by John. Thanks to all involved!

        Show
        Paul King added a comment - Documentation fixed by John. Thanks to all involved!

          People

          • Assignee:
            Paul King
            Reporter:
            Andrey Panasyuk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: