RFR: 8244419: TextAreaSkin: throws UnsupportedOperation on dispose

Ambarish Rapte arapte at openjdk.java.net
Mon Aug 23 10:09:33 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 to me too.

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

Marked as reviewed by arapte (Reviewer).

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


More information about the openjfx-dev mailing list