vorburger commented on a change in pull request #670: FINERACT-702: Integrate
SpotBugs and fix over 300 high priority issues
URL: https://github.com/apache/fineract/pull/670#discussion_r356986435
##########
File path:
fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyData.java
##########
@@ -97,4 +89,23 @@ private String generateDisplayLabel() {
public String getName() {
return name;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof CurrencyData)) return false;
+ CurrencyData that = (CurrencyData) o;
+ return decimalPlaces == that.decimalPlaces &&
+ code.equals(that.code) &&
+ name.equals(that.name) &&
+ inMultiplesOf.equals(that.inMultiplesOf) &&
Review comment:
@awasum this is missing `null` checks, and it's also why the build is
failing for you on this PR... just use
`[Objects.equals()](https://docs.oracle.com/javase/8/docs/api/java/util/Objects.html#equals-java.lang.Object-java.lang.Object-)`
instead!
----------------------------------------------------------------
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]
With regards,
Apache Git Services