diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexReader.java b/lucene/core/src/java/org/apache/lucene/index/IndexReader.java index f20b894b362..f9f80f5788b 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexReader.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexReader.java @@ -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); } }