sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 22/31: Remove Numerics.hashCode(long), replaced by Long.hashCode(long).
Date Mon, 18 Jun 2018 09:44:33 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 870d121046dd53b2c4d12dd5b9ec28a9c9b95cdb
Author: Martin Desruisseaux <desruisseaux@apache.org>
AuthorDate: Mon Jun 4 10:51:00 2018 +0000

    Remove Numerics.hashCode(long), replaced by Long.hashCode(long).
    
    
    git-svn-id: https://svn.apache.org/repos/asf/sis/branches/JDK8@1832816 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sis/geometry/AbstractDirectPosition.java   |  3 +--
 .../main/java/org/apache/sis/geometry/AbstractEnvelope.java    |  3 +--
 .../main/java/org/apache/sis/geometry/DirectPosition1D.java    |  3 +--
 .../main/java/org/apache/sis/geometry/DirectPosition2D.java    |  4 ++--
 .../org/apache/sis/referencing/AbstractIdentifiedObject.java   |  5 ++---
 .../org/apache/sis/referencing/cs/DirectionAlongMeridian.java  |  2 +-
 .../org/apache/sis/referencing/datum/TimeDependentBWP.java     |  3 +--
 .../org/apache/sis/referencing/operation/matrix/Matrix1.java   |  2 +-
 .../org/apache/sis/referencing/operation/matrix/Matrix2.java   |  2 +-
 .../referencing/operation/projection/NormalizedProjection.java |  2 +-
 .../sis/referencing/operation/projection/ZonedGridSystem.java  |  2 +-
 .../operation/transform/EllipsoidToCentricTransform.java       |  2 +-
 .../operation/transform/ExponentialTransform1D.java            |  2 +-
 .../sis/referencing/operation/transform/LinearTransform1D.java |  3 +--
 .../operation/transform/LogarithmicTransform1D.java            |  2 +-
 .../sis/referencing/operation/transform/MolodenskyFormula.java |  2 +-
 .../sis/referencing/operation/transform/PowerTransform1D.java  |  2 +-
 .../main/java/org/apache/sis/internal/util/DoubleDouble.java   |  2 +-
 .../src/main/java/org/apache/sis/internal/util/Numerics.java   | 10 ----------
 core/sis-utility/src/main/java/org/apache/sis/math/Line.java   |  2 +-
 core/sis-utility/src/main/java/org/apache/sis/math/Plane.java  |  2 +-
 .../src/main/java/org/apache/sis/measure/LinearConverter.java  |  6 +++---
 22 files changed, 25 insertions(+), 41 deletions(-)

diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
index 0362ae2..2136a8e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
@@ -40,7 +40,6 @@ import org.apache.sis.internal.referencing.WKTUtilities;
 import org.apache.sis.io.wkt.FormattableObject;
 import org.apache.sis.io.wkt.Formatter;
 
-import static java.lang.Double.doubleToLongBits;
 import static org.apache.sis.util.StringBuilders.trimFractionalPart;
 import static org.apache.sis.util.ArgumentChecks.ensureDimensionMatches;
 
@@ -392,7 +391,7 @@ parse:  while (i < length) {
         final int dimension = getDimension();
         int code = 1;
         for (int i=0; i<dimension; i++) {
-            code = code*31 + Numerics.hashCode(doubleToLongBits(getOrdinate(i)));
+            code = code*31 + Double.hashCode(getOrdinate(i));
         }
         return code + Objects.hashCode(getCoordinateReferenceSystem());
     }
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
index 08b28ba..abdcf54 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
@@ -35,7 +35,6 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.opengis.referencing.cs.CoordinateSystem;
 import org.opengis.referencing.cs.RangeMeaning;
-import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.util.Emptiable;
 import org.apache.sis.util.Utilities;
 import org.apache.sis.util.ComparisonMode;
@@ -1113,7 +1112,7 @@ public abstract class AbstractEnvelope extends FormattableObject implements
Enve
         boolean p = true;
         do {
             for (int i=0; i<dimension; i++) {
-                code = code*31 + Numerics.hashCode(doubleToLongBits(p ? getLower(i) : getUpper(i)));
+                code = code*31 + Double.hashCode(p ? getLower(i) : getUpper(i));
             }
         } while ((p = !p) == false);
         return code + Objects.hashCode(getCoordinateReferenceSystem());
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java
b/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java
index 9c5117a..8a7d41e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java
@@ -26,7 +26,6 @@ import java.io.Serializable;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.geometry.DirectPosition;
 import org.opengis.geometry.MismatchedDimensionException;
-import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.util.resources.Errors;
 
 import static org.apache.sis.util.ArgumentChecks.ensureDimensionMatches;
@@ -245,7 +244,7 @@ public class DirectPosition1D extends AbstractDirectPosition implements
Serializ
      */
     @Override
     public int hashCode() {
-        final int code = 31 + Numerics.hashCode(Double.doubleToLongBits(ordinate)) + Objects.hashCode(crs);
+        final int code = 31 + Double.hashCode(ordinate) + Objects.hashCode(crs);
         assert code == super.hashCode();
         return code;
     }
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
b/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
index fec0426..8926f70 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
@@ -303,8 +303,8 @@ public class DirectPosition2D extends Point2D.Double implements DirectPosition,
      */
     @Override
     public int hashCode() {
-        int code =  31 + Numerics.hashCode(doubleToLongBits(x));
-        code = code*31 + Numerics.hashCode(doubleToLongBits(y));
+        int code =  31 + java.lang.Double.hashCode(x);
+        code = code*31 + java.lang.Double.hashCode(y);
         return code + Objects.hashCode(crs);
     }
 
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
index 877bc4b..11f378f 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
@@ -44,7 +44,6 @@ import org.opengis.referencing.IdentifiedObject;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.UseLegacyMetadata;
 import org.apache.sis.internal.jaxb.referencing.Code;
-import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
 import org.apache.sis.internal.metadata.NameToIdentifier;
 import org.apache.sis.internal.referencing.WKTUtilities;
@@ -792,13 +791,13 @@ public class AbstractIdentifiedObject extends FormattableObject implements
Ident
     public final int hashCode() {                       // No need to synchronize; ok if
invoked twice.
         int hash = hashCode;
         if (hash == 0) {
-            hash = Numerics.hashCode(computeHashCode());
+            hash = Long.hashCode(computeHashCode());
             if (hash == 0) {
                 hash = -1;
             }
             hashCode = hash;
         }
-        assert hash == -1 || hash == Numerics.hashCode(computeHashCode()) : hash;
+        assert hash == -1 || hash == Long.hashCode(computeHashCode()) : hash;
         return hash;
     }
 
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
index 01ccec7..b4889c6 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
@@ -248,7 +248,7 @@ final class DirectionAlongMeridian extends FormattableObject implements
Comparab
      */
     @Override
     public int hashCode() {
-        return Numerics.hashCode(Double.doubleToLongBits(meridian) + baseDirection.hashCode());
+        return Double.hashCode(meridian) + baseDirection.hashCode();
     }
 
     /**
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/TimeDependentBWP.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/TimeDependentBWP.java
index 8e1e5cf..92e20e0 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/TimeDependentBWP.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/TimeDependentBWP.java
@@ -20,7 +20,6 @@ import java.util.Date;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.referencing.datum.GeodeticDatum;
 import org.opengis.referencing.datum.PrimeMeridian;
-import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.util.DoubleDouble;
 
 import static org.apache.sis.util.ArgumentChecks.*;
@@ -294,6 +293,6 @@ public class TimeDependentBWP extends BursaWolfParameters {
      */
     @Override
     public int hashCode() {
-        return super.hashCode() ^ Numerics.hashCode(timeReference);
+        return super.hashCode() ^ Long.hashCode(timeReference);
     }
 }
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
index a98ad6a..8504238 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
@@ -282,6 +282,6 @@ public final class Matrix1 extends MatrixSIS {
      */
     @Override
     public int hashCode() {
-        return Numerics.hashCode(Double.doubleToLongBits(m00) ^ serialVersionUID);
+        return Long.hashCode(Double.doubleToLongBits(m00) ^ serialVersionUID);
     }
 }
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
index 3312b84..04e0f51 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
@@ -309,7 +309,7 @@ public final class Matrix2 extends MatrixSIS {
      */
     @Override
     public int hashCode() {
-        return Numerics.hashCode(serialVersionUID ^
+        return Long.hashCode(serialVersionUID ^
                 (((Double.doubleToLongBits(m00)  +
               31 * Double.doubleToLongBits(m01)) +
               31 * Double.doubleToLongBits(m10)) +
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
index f9c279e..c76c036 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
@@ -911,7 +911,7 @@ public abstract class NormalizedProjection extends AbstractMathTransform2D
imple
                 c = c*31 + Double.doubleToLongBits(parameters[i]);
             }
         }
-        return super.computeHashCode() ^ Numerics.hashCode(c);
+        return super.computeHashCode() ^ Long.hashCode(c);
     }
 
     /**
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ZonedGridSystem.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ZonedGridSystem.java
index 85fd72e..91b8401 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ZonedGridSystem.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ZonedGridSystem.java
@@ -255,7 +255,7 @@ public class ZonedGridSystem extends AbstractMathTransform2D implements
Serializ
     @Override
     protected int computeHashCode() {
         final long c = Double.doubleToLongBits(initialLongitude) + 31*Double.doubleToLongBits(zoneWidth);
-        return (super.computeHashCode() ^ Numerics.hashCode(c)) + 37 * projection.hashCode();
+        return (super.computeHashCode() ^ Long.hashCode(c)) + 37 * projection.hashCode();
     }
 
     /**
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
index 87bf23c..19ca548 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
@@ -748,7 +748,7 @@ next:   while (--numPts >= 0) {
      */
     @Override
     protected int computeHashCode() {
-        int code = super.computeHashCode() + Numerics.hashCode(Double.doubleToLongBits(axisRatio));
+        int code = super.computeHashCode() + Double.hashCode(axisRatio);
         if (withHeight) code += 37;
         return code;
     }
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
index 728b15e..7ef09b1 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
@@ -283,7 +283,7 @@ final class ExponentialTransform1D extends AbstractMathTransform1D implements
Se
      */
     @Override
     protected int computeHashCode() {
-        return Numerics.hashCode(Double.doubleToLongBits(base)
+        return Long.hashCode(Double.doubleToLongBits(base)
                 + 31 * Double.doubleToLongBits(scale)) ^ super.computeHashCode();
     }
 
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
index bdd5395..f48965a 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
@@ -28,7 +28,6 @@ import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.referencing.operation.matrix.Matrix1;
 import org.apache.sis.referencing.operation.matrix.Matrix2;
 import org.apache.sis.internal.referencing.provider.Affine;
-import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.util.ComparisonMode;
 /*
  * We really want to use doubleToRawLongBits, not doubleToLongBits, because the
@@ -350,7 +349,7 @@ class LinearTransform1D extends AbstractMathTransform1D implements LinearTransfo
      */
     @Override
     protected int computeHashCode() {
-        return Numerics.hashCode(doubleToRawLongBits(offset) + 31*doubleToRawLongBits(scale))
^ super.computeHashCode();
+        return Long.hashCode(doubleToRawLongBits(offset) + 31*doubleToRawLongBits(scale))
^ super.computeHashCode();
     }
 
     /**
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
index bdc5e9a..0be0bb5 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LogarithmicTransform1D.java
@@ -406,7 +406,7 @@ class LogarithmicTransform1D extends AbstractMathTransform1D implements
Serializ
         /** {@inheritDoc} */
         @Override
         protected int computeHashCode() {
-            return Numerics.hashCode(Double.doubleToLongBits(offset)) ^ super.computeHashCode();
+            return Double.hashCode(offset) ^ super.computeHashCode();
         }
 
         /** Compares the specified object with this math transform for equality. */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyFormula.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyFormula.java
index 80920c4..6386fc3 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyFormula.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MolodenskyFormula.java
@@ -453,7 +453,7 @@ abstract class MolodenskyFormula extends DatumShiftTransform {
      */
     @Override
     protected int computeHashCode() {
-        int code = super.computeHashCode() + Numerics.hashCode(
+        int code = super.computeHashCode() + Long.hashCode(
                         Double.doubleToLongBits(Δa)
                 +       Double.doubleToLongBits(Δfmod)
                 + 31 * (Double.doubleToLongBits(tX)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java
index b05de03..1c0f6cf 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PowerTransform1D.java
@@ -194,7 +194,7 @@ final class PowerTransform1D extends AbstractMathTransform1D implements
Serializ
      */
     @Override
     protected int computeHashCode() {
-        return super.computeHashCode() + Numerics.hashCode(Double.doubleToLongBits(power));
+        return super.computeHashCode() + Double.hashCode(power);
     }
 
     /**
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
b/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
index 3cefe5a..473d0cb 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
@@ -1077,7 +1077,7 @@ public final class DoubleDouble extends Number {
      */
     @Override
     public int hashCode() {
-        return Numerics.hashCode(Double.doubleToLongBits(value) ^ Double.doubleToLongBits(error));
+        return Long.hashCode(Double.doubleToLongBits(value) ^ Double.doubleToLongBits(error));
     }
 
     /**
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
index 219d76f..2540dd6 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
@@ -308,16 +308,6 @@ public final class Numerics extends Static {
     }
 
     /**
-     * Returns a hash code value for the given long.
-     *
-     * @param  c  the value to hash.
-     * @return hash code value for the given long.
-     */
-    public static int hashCode(final long c) {
-        return ((int) c) ^ (int) (c >>> Integer.SIZE);
-    }
-
-    /**
      * Converts an unsigned {@code long} to a {@code float} value.
      *
      * @param  value  the unsigned {@code long} value.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Line.java b/core/sis-utility/src/main/java/org/apache/sis/math/Line.java
index 5cc8b9a..6c0fae9 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/Line.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/Line.java
@@ -412,7 +412,7 @@ public class Line implements Cloneable, Serializable {
      */
     @Override
     public int hashCode() {
-        return Numerics.hashCode(serialVersionUID ^ (doubleToLongBits(slope) + 31*doubleToLongBits(y0)));
+        return Long.hashCode(serialVersionUID ^ (doubleToLongBits(slope) + 31*doubleToLongBits(y0)));
     }
 
     /**
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java b/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java
index 13b8867..1b959f0 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/Plane.java
@@ -590,7 +590,7 @@ public class Plane implements Cloneable, Serializable {
      */
     @Override
     public int hashCode() {
-        return Numerics.hashCode(serialVersionUID
+        return Long.hashCode(serialVersionUID
                      ^ (Double.doubleToLongBits(z0)
                 + 31 * (Double.doubleToLongBits(sx)
                 + 31 * (Double.doubleToLongBits(sy)))));
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java b/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java
index f089e4c..03cf2e0 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/LinearConverter.java
@@ -423,9 +423,9 @@ final class LinearConverter extends AbstractConverter implements LenientComparab
      */
     @Override
     public int hashCode() {
-        return Numerics.hashCode(Double.doubleToLongBits(scale)
-                         + 31 * (Double.doubleToLongBits(offset)
-                         + 37 *  Double.doubleToLongBits(divisor)));
+        return Long.hashCode(Double.doubleToLongBits(scale)
+                     + 31 * (Double.doubleToLongBits(offset)
+                     + 37 *  Double.doubleToLongBits(divisor)));
     }
 
     /**

-- 
To stop receiving notification emails like this one, please contact
desruisseaux@apache.org.

Mime
View raw message