RFR: 8376492: NullPointer in ContextMenu sub-menu when graphic and style classes are changed while the menu is open [v2]
Dmitry Markov
dmarkov at openjdk.org
Mon Feb 23 16:23:04 UTC 2026
On Mon, 23 Feb 2026 16:18:47 GMT, Dmitry Markov <dmarkov at openjdk.org> wrote:
>> A NullPointerException occurs when a ContextMenu submenu is opened for the second time and the graphic and style classes are modified while the menu is open.
>>
>> Fix: Added a null check.
>
> Dmitry Markov has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove previous ItemStyleClassListener
I have updated the fix based on @eduardsdv suggestion: implement removal of previous `itemStyleClassListener` in `createChildred()` method.
I cannot replicate the `NPE` and do not observe that number of `itemStyleClassListener` is growing anymore.
Please review the new version.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/2075#issuecomment-3945787078
More information about the openjfx-dev
mailing list