RFR: 8245145: Spinner: throws IllegalArgumentException when replacing skin [v4]

Kevin Rushforth kcr at openjdk.org
Tue Dec 6 23:38:24 UTC 2022


On Tue, 6 Dec 2022 17:18:50 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Fixed SpinnerSkin initialization using new Skin.install().  Also in this PR - fixing memory leaks in SpinnerSkin by properly removing all listeners and event filters added in the constructor, as well as any child Nodes.
>> 
>> NOTE: the fix requires both ListenerHelper [JDK-8294809](https://bugs.openjdk.org/browse/JDK-8294809) and Skin.install() [JDK-8290844](https://bugs.openjdk.org/browse/JDK-8290844) changes.
>
> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 53 commits:
> 
>  - 8245145: clarification
>  - Merge remote-tracking branch 'origin/master' into 8245145.spinner.skin
>  - Merge remote-tracking branch 'origin/master' into 8245145.spinner.skin
>  - Merge remote-tracking branch 'origin/master' into 8245145.spinner.skin
>  - 8245145: cleanup
>  - 8245145: cleanup
>  - 8245145: cleanup
>  - Merge remote-tracking branch 'origin/master' into 8245145.spinner.skin
>  - 8245145: listener helper
>  - Merge branch '8294809.listener.helper' into 8245145.spinner.skin
>  - ... and 43 more: https://git.openjdk.org/jfx/compare/6f36e704...f83fc9d6

Looks good with one minor formatting issue.

modules/javafx.controls/src/main/java/javafx/scene/control/skin/SpinnerSkin.java line 275:

> 273:     @Override
> 274:     public void dispose() {
> 275:         if(getSkinnable() == null) {

Minor: add a space after the `if`.

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

Marked as reviewed by kcr (Lead).

PR: https://git.openjdk.org/jfx/pull/904


More information about the openjfx-dev mailing list