uschindler commented on PR #1765:
URL: https://github.com/apache/solr/pull/1765#issuecomment-1627728458

   To make sure that all logs are written on early startup, we should add this 
code to the early startup phase after logging is fully configured:
   
   ```java
   Stream.of(MMapDirectory.class, VectorUtil.class).forEach(cls -> {
    try {
     Class.forName(cls.getName());
    } catch (ReflectiveOperationException re) {
     throw new SolrException(...)
    }
   });
   ```
   
   Maybe add a TODO to use `MethodHandles.lookup().ensureClassInitialized` in 
Solr 10 w/ Java 17:
   
   ```java
   final var lookup = MethodHandles.lookup();
   Stream.of(MMapDirectory.class, VectorUtil.class).forEach(cls -> {
    try {
     lookup.ensureInitialized(cls);
    } catch (ReflectiveOperationException re) {
     throw new SolrException(...)
    }
   });
   ```


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