On Mon, 10 Apr 2023 08:32:33 GMT, Karthik P K <[email protected]> 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