MIFOSX-945 - added null check for id while sorting the transactions
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ public class SavingsAccountTransactionComparator implements Comparator<SavingsAc
|
|||||||
final int comparsion = o1.transactionLocalDate().compareTo(o2.transactionLocalDate());
|
final int comparsion = o1.transactionLocalDate().compareTo(o2.transactionLocalDate());
|
||||||
if (comparsion == 0) {
|
if (comparsion == 0) {
|
||||||
compareResult = o1.createdDate().compareTo(o2.createdDate());
|
compareResult = o1.createdDate().compareTo(o2.createdDate());
|
||||||
if (compareResult == 0) {
|
if (compareResult == 0 && o1.getId() != null && o2.getId() != null) {
|
||||||
compareResult = o1.getId().compareTo(o2.getId());
|
compareResult = o1.getId().compareTo(o2.getId());
|
||||||
} else {
|
} else {
|
||||||
compareResult = comparsion;
|
compareResult = comparsion;
|
||||||
|
|||||||
Reference in New Issue
Block a user