On Tue, 11 Aug 2020 at 01:20, Gary Gregory <garydgreg...@gmail.com> wrote: > > CI builds are failing in CircularBufferInputStreamTest with: > > [INFO] Running > org.apache.commons.io.input.buffer.CircularBufferInputStreamTest > [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: > 0.137 s <<< FAILURE! - in > org.apache.commons.io.input.buffer.CircularBufferInputStreamTest > [ERROR] testRandomRead Time elapsed: 0.026 s <<< ERROR! > java.lang.IllegalStateException: Expected -68 at offset 316, got 188 > at > org.apache.commons.io.input.buffer.CircularBufferInputStreamTest.testRandomRead(CircularBufferInputStreamTest.java:51) > > I am guessing this commit: > > https://github.com/apache/commons-io/commit/a521b43e774a92f4c07461536ffc810715c762d8 > > > broke CI builds like: > > https://github.com/apache/commons-io/runs/968471774?check_suite_focus=true > > Thoughts?
The old test is wrong. If bytes are not converted to unsigned before being treated as ints, then one cannot tell the difference between EOF (int) -1 and (byte) -1. This is what caused the bug noted in IO683. > Thank you, > Gary --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org