uschindler commented on code in PR #15864:
URL: https://github.com/apache/lucene/pull/15864#discussion_r2976369096


##########
lucene/core/src/java/org/apache/lucene/internal/tests/TestSecrets.java:
##########
@@ -143,6 +129,14 @@ public static void 
setFilterInputIndexAccess(FilterIndexInputAccess filterIndexI
     TestSecrets.filterIndexInputAccess = filterIndexInputAccess;
   }
 
+  private static void ensureInitialized(Class<?> clazz) {
+    try {
+      MethodHandles.lookup().ensureInitialized(clazz);

Review Comment:
   It's better to have the lookup as static final field as creating it has 
overhead 



-- 
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]

Reply via email to