[Rev 01] RFR: 8244112: Skin implementations: must not violate contract of dispose
Ajit Ghaisas
aghaisas at openjdk.java.net
Wed May 13 09:53:49 UTC 2020
On Wed, 6 May 2020 11:46:27 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> some skins have not been guarding themselves against multiple calls to dispose (see issue for details)
>>
>> Fixed by backing out off dispose if skinnable is null. Added test (parameterized in control class) for all controls in
>> the controls package. Those that failed for the misbehaving skins before are passing after the fix.
>
> Jeanette Winzenburg has updated the pull request incrementally with one additional commit since the last revision:
>
> cleanup
>
> - corrected incorrect bug id in commented
> - removed unrelated test change from TextAreaTest
> - updated copyright year
Fix looks good. Nice test as well.
I have minor comments.
modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuButtonSkinBase.java line 221:
> 220: @Override public void dispose() {
> 221: // FIXME : JDK-8244112 - backout if we are already disposed
> 222: // should check for getSkinnable to be null and return
Remove this FIXME comment.
modules/javafx.controls/src/shims/java/javafx/scene/control/ControlShim.java line 38:
> 37: *
> 38: * @param control the control the set the default skin on
> 39: */
"the control the set the default skin on" --> "the control to set the default skin on"
-------------
PR: https://git.openjdk.java.net/jfx/pull/209
More information about the openjfx-dev
mailing list