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

File.eachLine reports line numbers starting with 1, 2,...

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.6, 1.6-beta-1
    • Fix Version/s: 1.5.7, 1.6-beta-2
    • Component/s: None
    • Labels:
      None
    • Environment:
      any

      Description

      file.eachLine

      { line, number -> assert number > 0 }

      Programmers would expect the line numbers to start with 0, 1,...

      Furthermore the current behaviour is incompatible with e.g. List.eachWithIndex what makes it difficult to write closures that work in both cases.

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              veita Alexander Veit
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: