LUCENE-9290 Fix TestXYPoint#testEqualsAndHashCode

closes #1375
This commit is contained in:
Ignacio Vera 2020-03-25 08:20:35 +01:00 committed by Mike Drob
parent a0b0c710b5
commit 8cb50a52bc
2 changed files with 4 additions and 1 deletions

View File

@ -99,6 +99,9 @@ Bug fixes
* LUCENE-9117: RamUsageEstimator hangs with AOT compilation. Removed any attempt to
estimate Long.valueOf cache size. (Cleber Muramoto, Dawid Weiss)
* LUCENE-9290: Don't assume that different XYPoint have different hash code
(Ignacio Vera via Mike Drob)
Other
* LUCENE-8768: Fix Javadocs build in Java 11. (Namgyu Kim)

View File

@ -68,7 +68,7 @@ public class TestXYPoint extends LuceneTestCase {
XYPoint otherPoint = new XYPoint(ShapeTestUtil.nextFloat(random()), ShapeTestUtil.nextFloat(random()));
if (point.getX() != otherPoint.getX() || point.getY() != otherPoint.getY()) {
assertNotEquals(point, otherPoint);
assertNotEquals(point.hashCode(), otherPoint.hashCode());
// it is possible to have hashcode collisions
} else {
assertEquals(point, otherPoint);
assertEquals(point.hashCode(), otherPoint.hashCode());