diff --git a/src/java/org/apache/commons/lang/builder/EqualsBuilder.java b/src/java/org/apache/commons/lang/builder/EqualsBuilder.java index 78042fb40..3200306c0 100644 --- a/src/java/org/apache/commons/lang/builder/EqualsBuilder.java +++ b/src/java/org/apache/commons/lang/builder/EqualsBuilder.java @@ -377,12 +377,8 @@ public class EqualsBuilder { } Class lhsClass = lhs.getClass(); if (!lhsClass.isArray()) { - 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); - } + // The simple case, not an array, just test the element + isEquals = lhs.equals(rhs); } else if (lhs.getClass() != rhs.getClass()) { // Here when we compare different dimensions, for example: a boolean[][] to a boolean[] this.setEquals(false); diff --git a/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java b/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java index f28df6e43..4429af53b 100644 --- a/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java +++ b/src/test/org/apache/commons/lang/builder/EqualsBuilderTest.java @@ -384,14 +384,6 @@ public class EqualsBuilderTest extends TestCase { assertTrue(new EqualsBuilder().append(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY).isEquals()); } - // https://issues.apache.org/jira/browse/LANG-393 - public void testBigDecimal() { - BigDecimal o1 = new BigDecimal("2.0"); - BigDecimal o2 = new BigDecimal("2.00"); - assertTrue(new EqualsBuilder().append(o1, o1).isEquals()); - assertTrue(new EqualsBuilder().append(o1, o2).isEquals()); - } - public void testAccessors() { EqualsBuilder equalsBuilder = new EqualsBuilder(); assertTrue(equalsBuilder.isEquals());