RFR: 8353845: com.sun.javafx.css.BitSet.equals(null) throws NPE [v2]

Andy Goryachev angorya at openjdk.org
Wed Apr 9 14:44:36 UTC 2025


On Wed, 9 Apr 2025 09:07:40 GMT, Michael Strauß <mstrauss at 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

Changes requested by angorya (Reviewer).

modules/javafx.graphics/src/test/java/test/com/sun/javafx/css/BitSetTest.java line 52:

> 50:         assertFalse(set.equals(null));
> 51:     }
> 52: 

Since we are here, should we add a case to test `equals()` with a non-empty `HashSet` or `Set.of()`, similar to `twoEmptyBitSetsShouldBeEqual()`?

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

PR Review: https://git.openjdk.org/jfx/pull/1766#pullrequestreview-2753750024
PR Review Comment: https://git.openjdk.org/jfx/pull/1766#discussion_r2035531625


More information about the openjfx-dev mailing list