rishabhdaim commented on code in PR #1958:
URL: https://github.com/apache/jackrabbit-oak/pull/1958#discussion_r1907020571


##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/FieldFactory.java:
##########
@@ -70,12 +72,10 @@ public final class FieldFactory {
         OAK_TYPE_NOT_STORED.setIndexOptions(DOCS_AND_FREQS_AND_POSITIONS);
         OAK_TYPE_NOT_STORED.setTokenized(true);
         OAK_TYPE_NOT_STORED.freeze();
-
-        Arrays.sort(TYPABLE_TAGS);
     }
 
     public static boolean canCreateTypedField(Type<?> type) {
-        return Ints.contains(TYPABLE_TAGS, type.tag());
+        return TYPABLE_TAGS.contains(type.tag());

Review Comment:
   AFAIK `List.contains` always run in linear time irrespective of whether 
`List` is sorted or not.



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

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

Reply via email to