rpuch commented on code in PR #4583:
URL: https://github.com/apache/ignite-3/pull/4583#discussion_r1806388189


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/index/MetaIndexStatus.java:
##########
@@ -70,6 +71,9 @@ public enum MetaIndexStatus {
     private static final MetaIndexStatus[] VALUES_INDEXED_BY_CODE;
 
     static {
+        long distinctCodes = Arrays.stream(values()).map(s -> 
s.code).distinct().count();

Review Comment:
   `values()` is called 4 times in this static initialization block. This 
creates 4 tiny arrays, which is absolutely not a problem for a one-off action. 
Introducing a variable will harm the understanding of the code more



-- 
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: notifications-unsubscr...@ignite.apache.org

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

Reply via email to