tanvir-ux opened a new pull request, #874:
URL: https://github.com/apache/commons-io/pull/874

   Fixes [IO-780](https://issues.apache.org/jira/browse/IO-780).
   
   `ReaderInputStream.fillBuffer()` called `CharsetEncoder.flush()` whenever 
the reader had reached EOF, overwriting `lastCoderResult` from `encode()`. When 
`encode()` reported malformed input (for example a trailing unpaired surrogate 
with the default `CodingErrorAction.REPORT`), the error was discarded and 
`read()` returned `-1` instead of throwing.
   
   This checks `lastCoderResult.isError()` after `encode()` and after `flush()`.
   
   The existing `testCodingError()` WIP now asserts `CharacterCodingException` 
for both `read()` and `read(byte[])`, matching the JIRA reproducer.
   
   Local: `mvn -Dtest=org.apache.commons.io.input.ReaderInputStreamTest test` → 
27 tests, 0 failures.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to