On Tue, 9 Dec 2025 03:52:57 GMT, Sergey Bylokhov <[email protected]> wrote:

> > GenericEditor extends DefaultCellEditor which extends AbstractCellEditor 
> > which is Serializable so I guess by default that class becomes Serializable 
> > but in JTable other things are pointing to the fact editing should not be 
> > serialized so we have made the field in GenericEditor transient.
> 
> It is not serialized by "default", it is only serialized if it is referenced 
> from somewhere. In our case, it is referenced from somewhere inside JTable, 
> which we tried to serialize.

GenericEditor is instantiated from JTable contstuctor
JTable->initializeLocalVars->createDefaultEditors->new GenericEditor()
so when JTable gets serialized in writeObject it calls `s.defaultWriteObject()` 
which tried to serialize this class by default which it can't so we got an 
exception..

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

PR Comment: https://git.openjdk.org/jdk/pull/28627#issuecomment-3630144892

Reply via email to