RFR: 8256821: TreeViewSkin/Behavior: misbehavior on switching skin

Ambarish Rapte arapte at openjdk.java.net
Mon Dec 7 09:33:18 UTC 2020

On Tue, 24 Nov 2020 14:17:21 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

> issues with behavior:
> - memory leak due to an key eventHandler that's not removed
> - after dispose, still modifying treeView (anchor) state due to listeners selection that are not removed
> issues with skin:
> - memory leak due to behavior leaking
> - memory leak due to cellFactory in flow not removed
> - throws NPE after switching (on modifying root children, refresh) due to listeners not removed
> Fixed by cleaning up as needed. Added tests that are failing before and passing after the fix.

Looks good, requested a minor change.

modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/SkinCleanupTest.java line 71:

> 69:     @Test
> 70:     public void testTreeViewSetRoot() {
> 71:         TreeView<String> listView = new TreeView<>(createRoot());

minor: Please rename the variable to `treeView` in this method and others.


Changes requested by arapte (Reviewer).

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

More information about the openjfx-dev mailing list