RFR: 8345348: CSS media feature queries [v13]
Andy Goryachev
angorya at openjdk.org
Mon May 5 18:56:05 UTC 2025
On Mon, 14 Apr 2025 12:56:17 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/javafx/css/media/MediaRule.java line 129:
>>
>>> 127: public int hashCode() {
>>> 128: return hash;
>>> 129: }
>>
>> You're basically saying here that a media rule with or without parent but the same queries is the same. However, parent is taken into account while writing/reading and evaluating. I think this deserves a justification.
>
> I might just remove `equals()`/`hashCode()`, because the class is not used in a way where equality would be relevant.
As far as I can tell, MediaRule is not exposed publicly, neither it's put into a hashtable, so we might as well remove `hash`, `hashCode()` and `equals()`
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1655#discussion_r2073949073
More information about the openjfx-dev
mailing list