On Wed, 17 May 2023 22:37:27 GMT, John Hendrikx <[email protected]> wrote:
>> 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). that's my point. I suppose we could use sealed class here, since javafx requires minimum java17? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1070#discussion_r1197153628
