RFR: JDK-8304933: BitSet (used for CSS pseudo class states) listener management is incorrect
Kevin Rushforth
kcr at openjdk.org
Mon Apr 10 21:46:51 UTC 2023
On Mon, 10 Apr 2023 21:14:02 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> BitSet uses the SetListenerHelper abstraction to prevent allocating the listener arrays.
>>
>> When removing listeners, the newly returned listener helper (which may be different from the one called) is not reassigned. This effectively means that removing the listener does not happen.
>>
>> This fix correctly assigns the potentially changed SetListenerHelper instance to BitSet's helper field after listener removal.
>
> modules/javafx.graphics/src/shims/java/com/sun/javafx/css/BitSetShim.java line 95:
>
>> 93: }
>> 94:
>> 95: // Generated delegate methods:
>
> Very minor: these methods are not generated as part of the build process that would warrant pointing it out.
Yes, it might be worth adding a comment to that effect.
> modules/javafx.graphics/src/test/java/test/com/sun/javafx/css/BitSetTest.java line 1:
>
>> 1: package test.com.sun.javafx.css;
>
> This file is missing a copyright header.
Ah, yes. Not sure how I missed that, but it will need to be fixed. Thanks for catching it.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1071#discussion_r1162113041
PR Review Comment: https://git.openjdk.org/jfx/pull/1071#discussion_r1162112257
More information about the openjfx-dev
mailing list