You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2015/06/02 15:55:41 UTC
svn commit: r1683115 -
/lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/spatial4j/geo3d/PlanetModel.java
Author: dsmiley
Date: Tue Jun 2 13:55:41 2015
New Revision: 1683115
URL: http://svn.apache.org/r1683115
Log:
LUCENE-6487: Fix Java 8 reference to Double.hashCode (use IntelliJ generated hashCode instead)
Modified:
lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/spatial4j/geo3d/PlanetModel.java
Modified: lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/spatial4j/geo3d/PlanetModel.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/spatial4j/geo3d/PlanetModel.java?rev=1683115&r1=1683114&r2=1683115&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/spatial4j/geo3d/PlanetModel.java (original)
+++ lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/spatial4j/geo3d/PlanetModel.java Tue Jun 2 13:55:41 2015
@@ -81,12 +81,18 @@ public class PlanetModel {
final PlanetModel other = (PlanetModel)o;
return ab == other.ab && c == other.c;
}
-
+
@Override
public int hashCode() {
- return Double.hashCode(ab) + Double.hashCode(c);
+ int result;
+ long temp;
+ temp = Double.doubleToLongBits(ab);
+ result = (int) (temp ^ (temp >>> 32));
+ temp = Double.doubleToLongBits(c);
+ result = 31 * result + (int) (temp ^ (temp >>> 32));
+ return result;
}
-
+
@Override
public String toString() {
if (this.equals(SPHERE)) {