oleksii-novikov-onix commented on code in PR #4520:
URL: https://github.com/apache/fineract/pull/4520#discussion_r2020689233


##########
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:
   I believe `alreadyProcessedInstallments` will always be an empty list in 
this case, because we are calling 
`ctx.getSkipRepaymentScheduleInstallments().clear()` before assigning it: 
`alreadyProcessedInstallments = ctx.getSkipRepaymentScheduleInstallments();`



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