TreeCellSkin installs listeners to the TreeView/fixedCellSize that introduce a memory leak, NPE on replacing the treeView and incorrect update of internal state.
Fixed by removing the listeners (and the internal state had been copied from treeView on change) and access of listView state when needed. Added tests that failed before and pass after the fix, plus a sanity test to guarantee same (correct) behavior before/after. Issue and fix is basically the same as for ListCellSkin [JDK-8246745](https://bugs.openjdk.java.net/browse/JDK-8246745) ------------- Commit messages: - 8253634: TreeCell/Skin: misbehavior on switching skin Changes: https://git.openjdk.java.net/jfx/pull/309/files Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=309&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8253634 Stats: 101 lines in 4 files changed: 60 ins; 36 del; 5 mod Patch: https://git.openjdk.java.net/jfx/pull/309.diff Fetch: git fetch https://git.openjdk.java.net/jfx pull/309/head:pull/309 PR: https://git.openjdk.java.net/jfx/pull/309