On Mon, 24 Apr 2023 20:43:35 GMT, Andy Goryachev <[email protected]> wrote:
>> John Hendrikx has updated the pull request incrementally with three
>> additional commits since the last revision:
>>
>> - Base BitSet on AbstractSet to inherit correct equals/hashCode/toArray
>>
>> - Removed faulty toArray implementations in PseudoClassState and
>> StyleClassSet
>> - Added test that verifies equals/hashCode for PseudoClassState respect
>> Set contract now
>> - Made getBits package private so it can't be inherited
>> - Remove unused code
>> - Ensure Match doesn't allow modification
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/BitSet.java line 243:
>
>> 241: public boolean containsAll(Collection<?> c) {
>> 242: if (c == null) {
>> 243: throw new NullPointerException("c cannot be null");
>
> I wonder if this is necessary - line 246 will produce an NPE with a similar
> message, right?
> (here and in some other places)
It would now, if we're okay with implicit null checks.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1076#discussion_r1176024762