The GitHub Actions job "Dependency Review" on commons-io.git/bugfix/ubais-skip-past-eof has succeeded. Run started by GitHub user simpleqt (triggered by garydgregory).
Head commit for run: 7b0803a6c4e14d04453f1b79ecbdadc3fbf5da44 / simpleqt <[email protected]> Fix undocumented exception in UnsynchronizedByteArrayInputStream.skip() Document the only runtime exception skip(long) throws: its Javadoc now states that a negative count throws IllegalArgumentException, records the JDK InputStream#skip contract that allows subclasses to handle negative counts differently, and states that a skip past the end of stream is clamped and never returns a negative count. Drop the Math.addExact()/Math.toIntExact() calls: once the skip count is clamped to the bytes left, the actual skip always fits in an int, so the exact math cannot throw and nothing in the method needs documenting besides the negative-count IllegalArgumentException. This also restores the "offset += actualSkip" semantics of the original 2020 implementation (b3960d977) that aafcd73bc ("Fix CodeQL issue.") replaced. Tests: testSkipPastEndOfStream now also covers a skip from a partly read stream and skip(0); new testSkipHugeCountDoesNotOverflow covers counts above Integer.MAX_VALUE; new testSkipOnClosedStream covers close(); testInvalidSkipNUnder also checks Long.MIN_VALUE and that the rejected skip leaves the stream untouched. Signed-off-by: simpleqt <[email protected]> Report URL: https://github.com/apache/commons-io/actions/runs/41487321664 With regards, GitHub Actions via GitBox
