vidakovic commented on code in PR #3563:
URL: https://github.com/apache/fineract/pull/3563#discussion_r1442548528
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JavaType.java:
##########
@@ -91,9 +91,7 @@ public enum JavaType {
OBJECT(Object.class), //
;
- public static final JavaType[] VALUES = values();
-
- private static final Map<Class<?>, JavaType> BY_TYPE =
Arrays.stream(VALUES).filter(e -> e.type != null)
+ private static final Map<Class<?>, JavaType> BY_TYPE =
Arrays.stream(values()).filter(e -> e.type != null)
Review Comment:
See my earlier comment. Again, kind of defeats the purpose of an enum. With
an enum you have type safety built-in, but then we bolt all those integers on
top of it and create a parallel structure that we could have simpler with
constants, why bother with enums?!?
--
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]