commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r711969 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java
Date Thu, 06 Nov 2008 20:36:28 GMT
Author: bayard
Date: Thu Nov  6 12:36:17 2008
New Revision: 711969

URL: http://svn.apache.org/viewvc?rev=711969&view=rev
Log:
Updating the BigDecimal.compareTo(Object) to BigDecimal.compareTo(BigDecimal) to match JDK
change - fixes LANG-468/LANG-464

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java?rev=711969&r1=711968&r2=711969&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java
(original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java
Thu Nov  6 12:36:17 2008
@@ -377,8 +377,8 @@
         }
         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);



Mime
View raw message