On Wed, 17 May 2023 22:08:53 GMT, Andy Goryachev <[email protected]> wrote:
>> We did, in #1076. However, I would like to not pull in all the `BitSet`
>> fixes into this PR as this has nothing to do with `BitSet` and its many
>> problems.
>
> Since it's an internal class, and both PseudoClassState and StyleClassSet are
> final, checking for class == class is probably sufficient.
> Do you think we should add a warning to BitSet, it is not a problem since
> no-one will ever extend it?
This is also solved in #1076:
if (obj instanceof BitSet<?> bitSet &&
getElementType().equals(bitSet.getElementType()))
But since that requires pulling in even more changes (`getElementType`) I've
left it there.
Relying on subclasses being final though seems like a bad idea for an abstract
class, unless we seal it and use permits (or, just remove `BitSet`
completely... it's purpose will be minimal if #1076 is accepted).
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1070#discussion_r1197124589