RFR: 8376169: JPopupMenu.setInvoker(null) causes NPE [v3]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Thu Jan 29 07:11:38 UTC 2026
On Thu, 29 Jan 2026 05:06:50 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> What happens if the new invoker is null, the old invoker is not null and the UI is null? Will we continue to receive events from the old invoker? Or this combination is not possible?
>
> 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
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29377#discussion_r2740258054
More information about the client-libs-dev
mailing list