galovics commented on code in PR #5173:
URL: https://github.com/apache/fineract/pull/5173#discussion_r2604024870
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallment.java:
##########
@@ -518,8 +518,9 @@ public int compareTo(LoanRepaymentScheduleInstallment o) {
return this.installmentNumber.compareTo(o.installmentNumber);
}
- public int compareToByDueDate(LoanRepaymentScheduleInstallment o) {
- return this.dueDate.compareTo(o.dueDate);
+ public int compareToByFromDueDate(LoanRepaymentScheduleInstallment o) {
+ int primary = this.dueDate.compareTo(o.dueDate);
+ return primary == 0 ? this.fromDate.compareTo(o.fromDate) : primary;
}
Review Comment:
Could be Comparator.comparing(...).andThen(...)
--
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]