Skip to content

Commit cfe4477

Browse files
committed
No need to nest else
1 parent a60bbf6 commit cfe4477

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
@@ -246,7 +246,8 @@ public int read() {
246246
public int read(final byte[] b, final int offset, final int length) {
247247
if (b == null) {
248248
throw new NullPointerException();
249-
} else if (offset < 0 || length < 0 || length > b.length - offset) {
249+
}
250+
if (offset < 0 || length < 0 || length > b.length - offset) {
250251
throw new IndexOutOfBoundsException(
251252
String.format("Range [%d, %<d + %d) out of bounds for length %d", offset, length, b.length));
252253
} else if (length == 0) {

0 commit comments

Comments
 (0)