[
https://issues.apache.org/jira/browse/IO-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved IO-715.
--------------------------------
Fix Version/s: 2.12.0
Resolution: Fixed
[~Marcono1234]
Please verify git master and close.
> ReaderInputStream does not mention behavior regarding CharsetEncoder.reset()
> ----------------------------------------------------------------------------
>
> Key: IO-715
> URL: https://issues.apache.org/jira/browse/IO-715
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Affects Versions: 2.8.0
> Reporter: Marcono1234
> Priority: Minor
> Fix For: 2.12.0
>
>
> Neither the class documentation of
> {{org.apache.commons.io.input.ReaderInputStream}} nor the documentation of
> the constructors taking {{CharsetEncoder}} arguments describe whether
> [{{CharsetEncoder.reset()}}|https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/charset/CharsetEncoder.html#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.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)