RFR: 8088594: NullPointerException on showing submenu of a contextmenu
Kevin Rushforth
kcr at openjdk.org
Fri Apr 7 12:46:50 UTC 2023
On Thu, 6 Apr 2023 13:03:04 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.
Andy and Ajit can formally review this, but I do have one quick minor comment. The test skin is in the package `test.robot.javafx.customSkins`, which doesn't match our code convention of using all lower-case letters for package names. I recommend changing this (meaning you will also need to rename the directory).
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1082#issuecomment-1500256917
More information about the openjfx-dev
mailing list