Skip to content

Commit 27d0441

Browse files
committed
Implicit narrowing conversion in compound assignment
1 parent fad225e commit 27d0441

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/apache/commons/io/input/UnsynchronizedBufferedReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ public long skip(final long amount) throws IOException {
465465
return read;
466466
}
467467
if (end - pos >= amount - read) {
468-
pos += amount - read;
468+
pos += Math.toIntExact(amount - read);
469469
return amount;
470470
}
471471
// Couldn't get all the characters, skip what we read

0 commit comments

Comments
 (0)