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


##########
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:
   ```suggestion
           return Arrays.stream(TYPABLE_TAGS).anyMatch(tag -> tag == 
type.tag());
   ```
   and we keep the type of `TYPABLE_TAGS` as `int[]`.



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