RFR: 6441373: Editing JTable is not Serializable
Prasanta Sadhukhan
psadhukhan at openjdk.org
Tue Dec 9 03:49:55 UTC 2025
On Tue, 9 Dec 2025 03:28:32 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> > ok check added..
>
> One question about the change in GenericEditor: if all editor-related fields in JTable are transient, then why do we still get an error saying that GenericEditor cannot be serialized? Where does the reference to it come from? Possibly from some listeners, if yes then at what point we clear that references?
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.
/** If editing, the <code>Component</code> that is handling the editing. */
protected transient Component editorComp;
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28627#issuecomment-3630124437
More information about the client-libs-dev
mailing list