RFR: 6441373: Editing JTable is not Serializable [v3]

Sergey Bylokhov serb at openjdk.org
Mon Feb 9 21:38:15 UTC 2026


> The patch implements serialization for editable JTables. Currently, most classes responsible for JTable editing are not serializable, so trying to serialize them causes an exception. The patch has two parts:
> 
>  - The editable JTable is reset to non-editable using the common pattern stopCellEditing + cancelCellEditing. This is added to the compWriteObjectNotify method, which acts as an entry point for serialization of Swing components. It allows actions to be performed before the parent classes are serialized.
> 
>  - The editing coordinates for all JTables are reset to -1. Before this patch, even non-editable JTables had their coordinates reset to 0 from -1 because the fields were transient.

Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:

 - Merge branch 'openjdk:master' into JDK-6441373
 - Merge branch 'openjdk:master' into JDK-6441373
 - Update JTableSerialization.java
 - 6441373: Editing JTable is not Serializable

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29313/files
  - new: https://git.openjdk.org/jdk/pull/29313/files/c2fb2cd5..203666fd

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29313&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29313&range=01-02

  Stats: 61829 lines in 982 files changed: 31138 ins; 18531 del; 12160 mod
  Patch: https://git.openjdk.org/jdk/pull/29313.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29313/head:pull/29313

PR: https://git.openjdk.org/jdk/pull/29313


More information about the client-libs-dev mailing list