vorburger commented on a change in pull request #1099:
URL: https://github.com/apache/fineract/pull/1099#discussion_r444493839



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalance.java
##########
@@ -100,8 +100,9 @@ public boolean equals(Object obj) {
         }
         TrialBalance other = (TrialBalance) obj;
         return Objects.equals(other.officeId, officeId) && 
Objects.equals(other.glAccountId, glAccountId)
-                && Objects.equals(other.amount, amount) && 
Objects.equals(other.entryDate, entryDate)
-                && Objects.equals(other.transactionDate, transactionDate) && 
Objects.equals(other.closingBalance, closingBalance);
+                && Objects.equals(other.amount, amount) && 
other.entryDate.compareTo(entryDate) == 0 ? Boolean.TRUE
+                        : Boolean.FALSE && 
other.transactionDate.compareTo(transactionDate) == 0 ? Boolean.TRUE

Review comment:
       @percyashu what @thesmallstar is pointing out here, and I agree with, is 
that `? Boolean.TRUE: Boolean.FALSE` is not required - as he said, just 
`other.entryDate.compareTo(entryDate) == 0` yields exactly the same value. The 
difference between primitive VS non-primitive is hidden by "auto boxing". Do 
you want to raise a follow-up PR to clean this up, or ignore this?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to