RFR: 8088594: NullPointerException on showing submenu of a contextmenu [v3]

Karthik P K kpk at openjdk.org
Wed Apr 12 05:08:48 UTC 2023


On Tue, 11 Apr 2023 15:04:27 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Karthik P K has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Add space between if and (
>>  - Address review comments
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ContextMenuSkin.java line 206:
> 
>> 204:         if (root instanceof ContextMenuContent) {
>> 205:             ((ContextMenuContent)root).disposeListeners();
>> 206:         }
> 
> We could use
> 
> 
>         if (root instanceof ContextMenuContent cm) {
>             cm.disposeListeners();
>         }
> 
> 
> pattern

Updated code. Please check

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1082#discussion_r1163608480


More information about the openjfx-dev mailing list