thesmallstar commented on a change in pull request #1251: URL: https://github.com/apache/fineract/pull/1251#discussion_r496283159
########## File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatus.java ########## @@ -80,6 +82,42 @@ public static LoanStatus fromInt(final Integer statusValue) { return enumeration; } + public static LoanStatus fromString(final String statusString) { + + LoanStatus enumeration = LoanStatus.INVALID; + + if (StringUtils.isEmpty(statusString)) { + return enumeration; + } + + if (statusString.equalsIgnoreCase(LoanStatus.SUBMITTED_AND_PENDING_APPROVAL.toString())) { Review comment: For the first part, yes, they would have the same effect. I copied this implementation from some other enum and hence the code looks like this and not how you suggested. Do you see any advantage of one over the other? 2nd part answer in a comment below. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org