mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-07 10:38:22 +00:00
Updating the BigDecimal.compareTo(Object) to BigDecimal.compareTo(BigDecimal) to match JDK change - fixes LANG-468/LANG-464
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@711969 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a6a2d04877
commit
b1e8a26177
@ -377,8 +377,8 @@ public EqualsBuilder append(Object lhs, Object rhs) {
|
||||
}
|
||||
Class lhsClass = lhs.getClass();
|
||||
if (!lhsClass.isArray()) {
|
||||
if (lhs instanceof java.math.BigDecimal) {
|
||||
isEquals = (((java.math.BigDecimal)lhs).compareTo(rhs) == 0);
|
||||
if (lhs instanceof java.math.BigDecimal && rhs instanceof java.math.BigDecimal) {
|
||||
isEquals = (((java.math.BigDecimal)lhs).compareTo((java.math.BigDecimal)rhs) == 0);
|
||||
} else {
|
||||
// The simple case, not an array, just test the element
|
||||
isEquals = lhs.equals(rhs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user