jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1180572 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java
Date Sun, 09 Oct 2011 09:04:53 GMT
Author: dbrosius
Date: Sun Oct  9 09:04:53 2011
New Revision: 1180572

URL: http://svn.apache.org/viewvc?rev=1180572&view=rev
Log:
when comparing BigDecimals use compareTo rather than equals as equals compares both value
and scale, so 2.0 is not equal to 2.00

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java?rev=1180572&r1=1180571&r2=1180572&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/DecimalValue.java
Sun Oct  9 09:04:53 2011
@@ -81,7 +81,7 @@ public class DecimalValue extends BaseVa
             if (number == other.number) {
                 return true;
             } else if (number != null && other.number != null) {
-                return number.equals(other.number);
+                return number.compareTo(other.number) == 0;
             }
         }
         return false;
@@ -174,4 +174,4 @@ public class DecimalValue extends BaseVa
             throw new ValueFormatException("empty value");
         }
     }
-}
\ No newline at end of file
+}



Mime
View raw message