RFR: 8244419: TextAreaSkin: throws UnsupportedOperation on dispose

Marius Hanl mhanl at openjdk.java.net
Mon Aug 16 19:45:27 UTC 2021


On Sat, 14 Aug 2021 10:32:00 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

> The issue was a glaring contract violation of TextAreaSkin which throws a UnsupportedOperationException. The fix was to remove the throwing and cleanup on dispose which implies
> 
> in TextAreaBehavior:
> - remove the listener to focusProperty in dispose
> 
> in TextAreaSkin:
> - register all listeners to control properties via skin api
> - remove installed event filter in dispose
> - remove direct children (here only the scrollPane)
> 
> Added tests to guard the listener re-wiring (must pass before and after), and tests to expose side-effects on replacing the skin (fail before, pass after)

Looks good. 
Verified test failing before and pass after (and some tests pass before/after).

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

Marked as reviewed by mhanl (Author).

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


More information about the openjfx-dev mailing list