Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-180

LineIterator documentation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4
    • 2.0
    • None
    • None

    Description

      In the Javadoc for rg.apache.commons.io.LineIterator (in Commons IO 1.4),
      this code snippet is incorrect: the last instance of "iterator" should be
      "it".

      LineIterator it = FileUtils.lineIterator(file, "UTF-8");
      try {
      while (it.hasNext())

      { String line = it.nextLine(); /// do something with line }

      } finally

      { LineIterator.closeQuietly(iterator); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            mdernst Michael Ernst
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.05h
                0.05h
                Remaining:
                Remaining Estimate - 0.05h
                0.05h
                Logged:
                Time Spent - Not Specified
                Not Specified