RFR: 8088594: NullPointerException on showing submenu of a contextmenu [v2]
Ajit Ghaisas
aghaisas at openjdk.org
Tue Apr 11 11:44:49 UTC 2023
On Mon, 10 Apr 2023 08:32:33 GMT, Karthik P K <kpk at openjdk.org> wrote:
>> When custom skin was loaded, the listeners added in `ContextMenuContent` class while loading the default skin were not removed. This was causing the NPE when outdated listeners were invoked.
>>
>> Updated the code to dispose listeners in the `dispose` method of `ContextMenuSkin` so that when new skin is loaded, listeners added in the old skin are removed.
>>
>> Added system test to validate the fix.
>
> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
>
> Renamed package to match coding convention
Overall the fix looks good.
I have one minor spacing comment.
modules/javafx.controls/src/main/java/javafx/scene/control/skin/ContextMenuSkin.java line 204:
> 202: root.idProperty().unbind();
> 203: root.styleProperty().unbind();
> 204: if(root instanceof ContextMenuContent) {
Minor: add a space between `if` and `(`
-------------
PR Review: https://git.openjdk.org/jfx/pull/1082#pullrequestreview-1377183234
PR Review Comment: https://git.openjdk.org/jfx/pull/1082#discussion_r1161500279
More information about the openjfx-dev
mailing list