RFR: 4938801: The popup does not go when the component is removed [v5]

Alexey Ivanov aivanov at openjdk.org
Tue Jul 29 12:10:05 UTC 2025


On Tue, 29 Jul 2025 11:53:05 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/JPopupMenu.java line 1383:
>> 
>>> 1381:             values.addElement("propListener");
>>> 1382:             values.addElement(propListener);
>>> 1383:         }
>> 
>> Do we need to serialise `propListener`? What is the value in serialising the listener?
>> 
>> Will `invoker` serialise `propListener`? If it does, then we need to serialise it to be able to remove the listener after the components are deserialised and the `invoker` is changed.
>
> There was failure in CI in some test citing NotSerializableException which was solved by serialising propListener

Weird… transient fields aren't serialised.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26407#discussion_r2239590058


More information about the client-libs-dev mailing list