You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2017/08/14 12:40:17 UTC

[18/36] lucene-solr:feature/autoscaling_72: LUCENE-7918: Fix incorrect equals method.

LUCENE-7918: Fix incorrect equals method.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/84d8385f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/84d8385f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/84d8385f

Branch: refs/heads/feature/autoscaling_72
Commit: 84d8385fb9fa3f794d5e473219ca6b5b2abee5f2
Parents: 90199e7
Author: Karl Wright <Da...@gmail.com>
Authored: Thu Aug 10 07:09:48 2017 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Thu Aug 10 07:09:48 2017 -0400

----------------------------------------------------------------------
 .../org/apache/lucene/spatial3d/geom/GeoBaseCompositeShape.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/84d8385f/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBaseCompositeShape.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBaseCompositeShape.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBaseCompositeShape.java
index 16a507c..5fe8af1 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBaseCompositeShape.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBaseCompositeShape.java
@@ -108,7 +108,7 @@ public abstract class GeoBaseCompositeShape<T extends GeoShape> implements GeoSh
 
   @Override
   public int hashCode() {
-    return super.hashCode() * 31 + shapes.hashCode();//TODO cache
+    return shapes.hashCode();
   }
 
   @Override
@@ -116,6 +116,6 @@ public abstract class GeoBaseCompositeShape<T extends GeoShape> implements GeoSh
     if (!(o instanceof GeoBaseCompositeShape<?>))
       return false;
     GeoBaseCompositeShape<?> other = (GeoBaseCompositeShape<?>) o;
-    return super.equals(o) && shapes.equals(other.shapes);
+    return shapes.equals(other.shapes);
   }
 }