Skip to content

Commit

Permalink
Catch runtime exceptions to make class loader race conditions easier …
Browse files Browse the repository at this point in the history
…to debug. (#608)

Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock authored May 10, 2021
1 parent 2581f3d commit 58f9aac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/main/java/org/opensearch/LegacyESVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ public class LegacyESVersion extends Version {
"expected [" + version.id + "] to be uniquely mapped but saw [" + maybePrevious + "] and [" + version + "]";
} catch (final IllegalAccessException e) {
assert false : "Version field [" + fieldName + "] should be public";
} catch (final RuntimeException e) {
assert false : "Version field [" + fieldName + "] threw [" + e + "] during initialization";
}
}
}
Expand Down

0 comments on commit 58f9aac

Please sign in to comment.