RFR: 8376169: JPopupMenu.setInvoker(null) causes NPE [v3]

Sergey Bylokhov serb at openjdk.org
Fri Jan 30 02:33:42 UTC 2026


On Thu, 29 Jan 2026 07:08:37 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> It will not remove the old invoker listener nor it will add new invoker listener..it probably will receive events but I dont think the events will be acted upon because as per the code, It will just invalidate the container
>>  and the outcome is same as it was before [JDK-4938801](https://bugs.openjdk.org/browse/JDK-4938801) fix..
>
> Also, I dont think ui null is valid combination as it means the L&F delegate is not set yet which normally handles the listeners

But the check for ui != null is there, and it should be possible to call this code when its null, no?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29377#discussion_r2744352084


More information about the client-libs-dev mailing list