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
@@ -458,9 +458,12 @@ private void waitForAsyncReadComplete() throws IOException {
iio.initCause(e);
throw iio;
} finally {
+ try {
isWaiting.set(false);
+ } finally {
stateChangeLock.unlock();
}
+ }
checkReadException();
}
}
