dweiss commented on code in PR #12677:
URL: https://github.com/apache/lucene/pull/12677#discussion_r1359203222


##########
lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java:
##########
@@ -120,24 +122,22 @@ static VectorizationProvider lookup(boolean testMode) {
     } else if (runtimeVersion >= 22) {
       LOG.warning(
           "You are running with Java 22 or later. To make full use of the 
Vector API, please update Apache Lucene.");
-    } else if (vectorModulePresentAndReadable()) {
+    } else if (vectorModulePresent(Objects::equals)) {

Review Comment:
   Yeah, tricky but also confusing. Wouldn't it be more readable if you just 
moved that addreads under the first if and resigned from passing a consumer to 
that method at all? It is a condition and an action in one.



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to