RFR: 6441373: Editing JTable is not Serializable [v6]
Sergey Bylokhov
serb at openjdk.org
Tue Dec 16 01:00:00 UTC 2025
On Mon, 15 Dec 2025 14:06:16 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> Leakage observation was red herring. It seems the JTable instance we are inspecting after the read operation is potentially being observed in a test context where the Swing EDT hasn't fully processed all cleanup events yet so when the test is fixed to use EDT properly, it doesn't show the leak and shows componentCount as 2.
I doubt that there is any cleanup logic in JTable. At first glance, your test is different: it creates a new JTable on each iteration and then serializes it. In my test, I always serialize the object that was previously deserialized, which is why getComponentCount() shows the accumulated count.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28627#issuecomment-3658235132
More information about the client-libs-dev
mailing list