RFR: JDK-8199216: Memory leak and quadratic layout time with nested nodes (hbox) and pseudo-class in style sheet [v3]
John Hendrikx
jhendrikx at openjdk.org
Fri Jun 9 12:57:51 UTC 2023
On Tue, 25 Apr 2023 05:35:57 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> 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.
I've switched to implicit null checks, but added a comment saying it is intended. It's also checked in unit tests so no danger of it being changed accidentally.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1076#discussion_r1224265614
More information about the openjfx-dev
mailing list