Could someone suggest a PMD xpath rule to warn that calling the equals()
method of java.math.BigDecimal
will check for both value and scale which usually (unless for some engineering type apps) might be a mistake. Since 1.0
not equals 1.00
, one should use compareTo
.
It looks rather complicated with PMD but FindBugs already has a rule for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With