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
Tue Apr 25 05:39:23 UTC 2023


On Mon, 24 Apr 2023 20:43:35 GMT, Andy Goryachev <angorya at openjdk.org> 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


More information about the openjfx-dev mailing list