RFR: 8345348: CSS media feature queries [v21]
Andy Goryachev
angorya at openjdk.org
Tue May 6 15:58:24 UTC 2025
On Tue, 6 May 2025 15:37:02 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Why?
>
> so an array with the same values produces a different hash code.
> in reality, it's highly unlikely.
>
> However, `FunctionExpression` is a `record`. What's the point of declaring it a record when you override `hashCode` and `equals`?
> Why?
made me think. the reason is _probably_ so that `class B extends A` would produce a different `hashCode`, but then `A.hashCode` should include not the class instance, but the `getClass()`:
class A {
public int hashCode() {
return Objects.hash(getClass(), ...);
}
}
class B extends A {
// B.hashCode() produces a value different from A.hashCode()
}
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1655#discussion_r2075781903
More information about the openjfx-dev
mailing list