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


##########
lucene/core/src/java/org/apache/lucene/internal/vector/VectorUtilProvider.java:
##########
@@ -76,4 +77,10 @@ static boolean vectorModulePresentAndReadable() {
     }
     return false;
   }
+
+  // Workaround for JDK-8301190, avoids assertion when default locale is say 
tr.
+  @SuppressForbidden(reason = "required to determine if non-workable locale")
+  static boolean useVectorAPI() {
+    return 'I' == int.class.getSimpleName().toUpperCase().charAt(0);

Review Comment:
   this confused me at first, it's really funny.
   
   How about a simpler: `return Objects.equals('I', "i".toUpperCase());`



##########
lucene/core/src/java/org/apache/lucene/internal/vector/VectorUtilProvider.java:
##########
@@ -76,4 +77,10 @@ static boolean vectorModulePresentAndReadable() {
     }
     return false;
   }
+
+  // Workaround for JDK-8301190, avoids assertion when default locale is say 
tr.
+  @SuppressForbidden(reason = "required to determine if non-workable locale")
+  static boolean useVectorAPI() {
+    return 'I' == int.class.getSimpleName().toUpperCase().charAt(0);

Review Comment:
   this confused me at first, it's really funny.
   
   How about a simpler: `return Objects.equals("I", "i".toUpperCase());`



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