On Tue, 9 Dec 2025 03:57:16 GMT, Prasanta Sadhukhan <[email protected]> wrote:
>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.. It does not matter that we created this object; it is only serialized if it is referenced by the JTable we are serializing or by other objects that are referenced by the JTable. All references to the editor are marked as transient, so the GenericEditor should not be stored by the JTable. After deserialization, it should be restored by calling readObject() → createDefaultEditors(). ------------- PR Comment: https://git.openjdk.org/jdk/pull/28627#issuecomment-3630342909
