Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2817

Off by one error on string indexing error reporting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.6-beta-2
    • 1.5.7, 1.6-beta-2
    • None
    • None
    • Ubuntu 8.04 Hardy Heron

    Description

      The following says it all really :

      |> groovy -e "println ( 'ab'[4] )"
      Caught: java.lang.StringIndexOutOfBoundsException: String index out of range: 5
      	at script_from_command_line.$cs$2(script_from_command_line)
      	at script_from_command_line.run(script_from_command_line:1)
      	at script_from_command_line.main(script_from_command_line)
      

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            russel Dr. Russel Winder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: