RFR: 8289389: Fix warnings: type should also implement hashCode() since it overrides Object.equals() [v2]

Nir Lisker nlisker at openjdk.org
Sat Jul 9 01:31:48 UTC 2022


On Fri, 8 Jul 2022 23:45:58 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8289389: toExternalForm()
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/CalculatedValue.java line 101:
> 
>> 99:         }
>> 100:         return h;
>> 101:     }
> 
> Just an example, but wouldn't: `Objects.hash(relative, origin, value)` here work just as well?

Honestly, I would just turn this class into a `record` and everything will be taken care of. I'm not sure it is within the scope of the fix.

-------------

PR: https://git.openjdk.org/jfx/pull/821


More information about the openjfx-dev mailing list