cortlepp commented on code in PR #15843:
URL: https://github.com/apache/lucene/pull/15843#discussion_r2965305792
##########
lucene/core/src/java/org/apache/lucene/store/PosixNativeAccess.java:
##########
@@ -79,14 +81,12 @@ static Optional<NativeAccess> getInstance() {
+ "pass the following on command line:
--enable-native-access=%s",
Optional.ofNullable(PosixNativeAccess.class.getModule().getName())
.orElse("ALL-UNNAMED")));
- } catch (RuntimeException | Error e) {
Review Comment:
> That wont happen because no method is marked as restricted.
That may be, but it's very brittle. What is the purpose for those re-throws
in the second and third catch? Also see my more general comment below, I just
think that initializing the class this way, especially considering that its an
optional feature on all platforms, can cause problems that are completely
avoidable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]