uschindler commented on code in PR #1765:
URL: https://github.com/apache/solr/pull/1765#discussion_r1258682017
##########
solr/core/src/java/org/apache/solr/servlet/CoreContainerProvider.java:
##########
@@ -226,6 +229,21 @@ public void init(ServletContext servletContext) {
StartupLoggingUtils.changeLogLevel(logLevel);
}
+ // Do initial logs for experimental Lucene classes.
+ // TODO: Use "MethodHandles.lookup().ensureClassInitialized()" instead
of "Class.forName()"
+ // once JDK 15+ is mandatory
+ Stream.of(MMapDirectory.class, VectorUtil.class)
+ .forEach(
+ cls -> {
+ try {
+ Class.forName(cls.getName());
+ } catch (ReflectiveOperationException re) {
+ throw new SolrException(
+ ErrorCode.SERVER_ERROR, "Could not load Lucene class: "
+ cls.getName());
+ }
+ });
+ VectorUtil.dotProduct(new byte[0], new byte[0]);
Review Comment:
If the class is initialized (what the previous code does), this call is
obsolete.
--
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]