Aman-Mittal commented on code in PR #5667:
URL: https://github.com/apache/fineract/pull/5667#discussion_r3005097970
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java:
##########
@@ -985,8 +984,11 @@ private String retrieveApprovalTemplate(final Long loanId,
final String loanExte
if (templateType == null) {
final String errorMsg = "Loan template type must be provided";
throw new LoanTemplateTypeRequiredException(errorMsg);
- } else if (templateType.equals("approval")) {
+ } else if ("approval".equals(templateType)) {
loanApprovalTemplate =
this.loanReadPlatformService.retrieveApprovalTemplate(resolvedLoanId);
+ } else {
Review Comment:
I Think You should add some tests for this implementation.
For the all Errors that it can throw in retrieveApprovalTemplate function.
--
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]