tkalkirill commented on code in PR #4152:
URL: https://github.com/apache/ignite-3/pull/4152#discussion_r1697092954
##########
modules/metastorage-api/src/main/java/org/apache/ignite/internal/metastorage/dsl/CompoundConditionType.java:
##########
@@ -17,10 +17,20 @@
package org.apache.ignite.internal.metastorage.dsl;
+import org.jetbrains.annotations.Nullable;
+
/**
* Type of compound condition.
*/
public enum CompoundConditionType {
AND,
- OR
+ OR;
+
+ /** Cached array with all enum values. */
+ private static final CompoundConditionType[] VALUES = values();
+
+ /** Returns the enumerated value from its ordinal, {@code null} if the
ordinal is invalid. */
+ public static @Nullable CompoundConditionType fromOrdinal(int ordinal) {
+ return ordinal < 0 || ordinal >= VALUES.length ? null :
VALUES[ordinal];
Review Comment:
I agree, I will try to fix this everywhere.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]