adamsaghy commented on code in PR #4520:
URL: https://github.com/apache/fineract/pull/4520#discussion_r2020696322


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java:
##########
@@ -1864,6 +1864,14 @@ private Money 
processAllocationsHorizontally(LoanTransaction loanTransaction, Tr
         List<LoanRepaymentScheduleInstallment> installments = 
transactionCtx.getInstallments();
         Money paidPortion;
         boolean exit = false;
+        List<LoanRepaymentScheduleInstallment> alreadyProcessedInstallments;
+        if (transactionCtx instanceof ProgressiveTransactionCtx ctx) {
+            ctx.getSkipRepaymentScheduleInstallments().clear();
+            alreadyProcessedInstallments = 
ctx.getSkipRepaymentScheduleInstallments();
+        } else {
+            alreadyProcessedInstallments = new ArrayList<>();
+        }
+

Review Comment:
   yes, it is okay to be an empty list before step into the do-while... also we 
need to clear the list what we store in the context



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