On Wed, 14 Oct 2020 12:08:59 GMT, Kevin Rushforth <[email protected]> wrote:
>> issue is a listener in ChoiceBoxSkin that wasn't removed (forgotten in my
>> first cleanup ;)
>>
>> Removed, un-ignored test that failed/passed before/after the fix
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ChoiceBoxSkin.java
> line 209:
>
>> 207: /** {@inheritDoc} */
>> 208: @Override public void dispose() {
>> 209: if (getSkinnable() == null) return;
>
> This will short-circuit the rest of the method, including the call to
> `super.dispose()`, if `getSkinnable()` is null.
> Are there any cases where this might miss some needed cleanup?
that's intentional - the usual pattern to make dispose cope with repeated calls
(something we learned in
[JDK-8244112](https://bugs.openjdk.java.net/browse/JDK-8244112): the ony valid
path to having skinnable null is a
previous call to dispose (which is allowed by client code) in which we already
did all clean-up.
-------------
PR: https://git.openjdk.java.net/jfx/pull/320