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


##########
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:
   I wanted to avoid to convert ints to Integers every time we do the check.
   
   I also assumed that the original author believed that sorting the array/list 
would help improve performance.
   
   If this is not the case we of course could make it a Set.



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