adamsaghy commented on code in PR #3515:
URL: https://github.com/apache/fineract/pull/3515#discussion_r1371833854
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceImpl.java:
##########
@@ -382,4 +408,96 @@ public int compare(DelinquencyRange o1, DelinquencyRange
o2) {
return ranges;
}
+ private void applyDelinquencyDetailsForLoanInstallments(final Loan loan,
final DelinquencyBucket delinquencyBucket,
+ final Map<Long, CollectionData> installmentsCollectionData) {
+ for (Map.Entry<Long, CollectionData> installmentCollectionData :
installmentsCollectionData.entrySet()) {
+ Optional<LoanRepaymentScheduleInstallment> installment =
loan.getRepaymentScheduleInstallments().stream()
Review Comment:
This can be optimised a little bit:
Iterate through the installments of the loan and get by id from the
installmentCollectionData the entry. If there is none, go next.
This way you only iterate through on the installments only once.
--
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]