On Wed, 9 Apr 2025 09:07:40 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

>> Fixes the bug that `BitSet.equals(null)` throws NPE.
>> 
>> A single reviewer should be sufficient.
>
> Michael Strauß has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   obj == null

modules/javafx.graphics/src/main/java/com/sun/javafx/css/BitSet.java line 540:

> 538:             return false;
> 539:         }
> 540: 

Here is a suggestion to modify this source as:


if (obj == null || getClass() != obj.getClass()) {
    return false;
}
return equalsBitSet((BitSet<?>) obj);

and with this the call to `super.equals()` won't be necessary. It seems it was 
unnecessary earlier too. it might have been added only to avoid missing return 
error.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1766#discussion_r2035261514

Reply via email to