RFR: 8246202: ChoiceBoxSkin: misbehavior on switching skin, part 2

Kevin Rushforth kcr at openjdk.java.net
Wed Oct 14 12:12:15 UTC 2020


On Wed, 14 Oct 2020 10:34:54 GMT, Jeanette Winzenburg <fastegal at openjdk.org> 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?

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

PR: https://git.openjdk.java.net/jfx/pull/320


More information about the openjfx-dev mailing list