RFR: 6441373: Editing JTable is not Serializable [v4]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Thu Dec 11 04:45:41 UTC 2025
> Issue is when JTable is in editing mode, it is not Serializable as it gives exception
>
> java.io.NotSerializableException: java.lang.reflect.Constructor
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1149) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1502)
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1467)
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1385)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1143) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1502)
> .......
>
>
> It is caused by creation of `GenericEditor` class which uses a non-serializable Constructor field.
> This is fixed by making the field transient..
> Also, `editorRemover` field is made transient as it is object of `CellEditorRemover` class which is not Serializable..
Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
GenericEditor serialization fix
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28627/files
- new: https://git.openjdk.org/jdk/pull/28627/files/504606d4..9f788115
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28627&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28627&range=02-03
Stats: 5 lines in 1 file changed: 2 ins; 1 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/28627.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28627/head:pull/28627
PR: https://git.openjdk.org/jdk/pull/28627
More information about the client-libs-dev
mailing list