Address SpotBugs Medium:
org.apache.commons.io.input.ReadAheadInputStream.waitForAsyncReadComplete()
does not release lock on all exception paths
[org.apache.commons.io.input.ReadAheadInputStream] At
ReadAheadInputStream.java:[line 448] UL_UNRELEASED_LOCK_EXCEPTION_PATH
MODIFY
src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java
src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java
@@ -458,9 +458,12 @@ private void waitForAsyncReadComplete() throws IOException {
iio.initCause(e);
throw iio;
} finally {
+ try {
isWaiting.set(false);
+ } finally {
stateChangeLock.unlock();
}
+ }
checkReadException();
}
}

Address SpotBugs Medium:
org.apache.commons.io.input.ReadAheadInputStream.waitForAsyncReadComplete()
does not release lock on all exception paths
[org.apache.commons.io.input.ReadAheadInputStream] At
ReadAheadInputStream.java:[line 448] UL_UNRELEASED_LOCK_EXCEPTION_PATH