Details
-
Test
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
None
-
New
Description
Test assumes that if two objects are different, then the has code must be different which is a wrong assumption.
Reproduce with:
ant test -Dtestcase=TestXYPoint -Dtests.method=testEqualsAndHashCode -Dtests.seed=733FAE735389BD86 -Dtests.slow=true -Dtests.badapples=true -Dtests.locale=en-PW -Dtests.timezone=Africa/Gaborone -Dtests.asserts=true -Dtests.file.encoding=UTF8
Error:
5:39:56 [junit4] > Throwable #1: java.lang.AssertionError: Values should be different. Actual: -268435620 05:39:56 [junit4] > at __randomizedtesting.SeedInfo.seed([733FAE735389BD86:F156BE502CC2B7]:0) 05:39:56 [junit4] > at org.apache.lucene.geo.TestXYPoint.testEqualsAndHashCode(TestXYPoint.java:71) 05:39:56 [junit4] > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)