throw IOExc, not RuntimeException wrapping IOExc, if we hit exc while closing IndexReader

This commit is contained in:
Mike McCandless 2016-01-28 19:10:09 -05:00
parent da5cc3cad5
commit 0607f007bf
1 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ public abstract class IndexReader implements Closeable {
parentReaders.add(reader);
}
private void notifyReaderClosedListeners(Throwable th) {
private void notifyReaderClosedListeners(Throwable th) throws IOException {
synchronized(readerClosedListeners) {
for(ReaderClosedListener listener : readerClosedListeners) {
try {
@ -151,7 +151,7 @@ public abstract class IndexReader implements Closeable {
}
}
}
IOUtils.reThrowUnchecked(th);
IOUtils.reThrow(th);
}
}