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

ReaderInputStream does not mention behavior regarding CharsetEncoder.reset()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.8.0
    • 2.12.0
    • Streams/Writers
    • None

    Description

      Neither the class documentation of org.apache.commons.io.input.ReaderInputStream nor the documentation of the constructors taking CharsetEncoder arguments describe whether CharsetEncoder.reset() is called.

      Since calling reset() is part of the encoding operation (see CharsetEncoder documentation), it should at least be specified whether this method is called or not.

      Additionally it might make sense to call reset() (though this might be a breaking change?) because encoding from a new (?) reader with an already used encoder which is not reset might lead to unexpected and incorrect results.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Marcono1234 Marcono1234
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: