<AWT Dev> [10] Review request for 8189201: [macosx] NotSerializableException during JFrame with MenuBar serialization

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Oct 23 19:58:49 UTC 2017


On 23/10/2017 12:41, Semyon Sadetsky wrote:
>> The AquaMenuBarBorder class is L&F specific, and it should not be 
>> serialized/deserialized. Such information(plus l&f client 
>> properties/listeners/etc) should be removed from the component before 
>> serialization. And during deserialization the L&F of the target system 
>> should be applied.
> That is valid concern. The webrev is updated 
> http://cr.openjdk.java.net/~ssadetsky/8189201/webrev.01/

The same is applicable to ScreenMenuPropertyListener as well because it 
is also L&F specific.
I assume that the changes in AccessibleAWTComponentHandler/etc are 
necessary because somecode installs the listeners on the components, 
since the bug is not reproduced in Metal I assume that this listeners 
are installed by Aqua, in this case these listeners also should be 
removed from the component before serialization.


-- 
Best regards, Sergey.


More information about the awt-dev mailing list