Skip to content

Commit 7b15fcd

Browse files
committed
No need to nest else
1 parent bf6c0cb commit 7b15fcd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ public int read(final byte[] b, final int offset, final int length) {
250250
if (offset < 0 || length < 0 || length > b.length - offset) {
251251
throw new IndexOutOfBoundsException(
252252
String.format("Range [%d, %<d + %d) out of bounds for length %d", offset, length, b.length));
253-
} else if (length == 0) {
253+
}
254+
if (length == 0) {
254255
return 0;
255256
}
256257
final List<Integer> drain = new ArrayList<>(Math.min(length, blockingQueue.size()));

0 commit comments

Comments
 (0)