RFR: 8289389: Fix warnings: type should also implement hashCode() since it overrides Object.equals() [v3]
Andy Goryachev
duke at openjdk.org
Tue Jul 19 15:28:11 UTC 2022
On Tue, 19 Jul 2022 03:46:17 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
>> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8289389: minimize the impact of collision
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/TreeViewTest.java line 3077:
>
>> 3075: @Override public boolean equals(Object obj) {
>> 3076: if (obj == null) return false;
>> 3077: return id == ((RT22599_DataType)obj).id;
>
> Same as `ListViewTest`.
this and ListViewTest - the logic in hashCode() follows the logic in equals().
it is fairly safe change, as these objects are never put into a hashtable and never accessed outside of the test context.
-------------
PR: https://git.openjdk.org/jfx/pull/821
More information about the openjfx-dev
mailing list