vidakovic commented on code in PR #3563:
URL: https://github.com/apache/fineract/pull/3563#discussion_r1442581333


##########
fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryType.java:
##########
@@ -41,16 +38,19 @@ public String getCode() {
         return this.code;
     }
 
-    private static final Map<Integer, JournalEntryType> intToEnumMap = new 
HashMap<>();
-
-    static {
-        for (final JournalEntryType type : JournalEntryType.values()) {
-            intToEnumMap.put(type.value, type);
+    public static JournalEntryType fromInt(final Integer v) {
+        if (v == null) {
+            return null;
         }
-    }
 
-    public static JournalEntryType fromInt(final int i) {
-        return intToEnumMap.get(i);
+        switch (v) {

Review Comment:
   Same as my previous comment.



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

Reply via email to