commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r992861 - /commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/Dfp.java
Date Sun, 05 Sep 2010 19:07:50 GMT
Author: luc
Date: Sun Sep  5 19:07:50 2010
New Revision: 992861

URL: http://svn.apache.org/viewvc?rev=992861&view=rev
Log:
fixed wrong hashcode for mantissa array

Modified:
    commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/Dfp.java

Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/Dfp.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/Dfp.java?rev=992861&r1=992860&r2=992861&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/Dfp.java
(original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/Dfp.java
Sun Sep  5 19:07:50 2010
@@ -833,7 +833,7 @@ public class Dfp implements FieldElement
      */
     @Override
     public int hashCode() {
-        return 17 + (sign << 8) + (nans << 16) + exp + mant.hashCode();
+        return 17 + (sign << 8) + (nans << 16) + exp + Arrays.hashCode(mant);
     }
 
     /** Check if instance is not equal to x.



Mime
View raw message