LUCENE-7775: fix exception handling to throw first exception hit

This commit is contained in:
Mike McCandless 2017-04-10 19:07:25 -04:00
parent e02a1f159e
commit d9973a38db
2 changed files with 2 additions and 2 deletions

View File

@ -456,7 +456,7 @@ class BufferedUpdatesStream implements Accountable {
try {
segStates[j].finish(pool);
} catch (Throwable th) {
if (firstExc != null) {
if (firstExc == null) {
firstExc = th;
}
}

View File

@ -85,7 +85,7 @@ final class SegmentDocValues {
try {
dvp.decRef();
} catch (Throwable th) {
if (t != null) {
if (t == null) {
t = th;
}
}