JDK-8278065 : Refactor subclassAudits to use ClassValue
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io:serialization
  • Affected Version: 11,17,18,19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2021-12-01
  • Updated: 2022-04-01
  • Resolved: 2022-01-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 18 JDK 19
11.0.16Fixed 17.0.4Fixed 18.0.2Fixed 19 b05Fixed
Related Reports
Relates :  
Description
As a follow-up to JDK-8277072, we should refactor java.io.ObjectInputStream.Caches#subclassAudits and java.io.ObjectOutputStream.Caches#subclassAudits to use ClassValue instead of SoftReference, similar to what we did in JDK-8277072 for java.io.ObjectStreamClass.Caches#localDescs. Then we can also remove the common machinery java.io.ObjectStreamClass#processQueue and java.io.ObjectStreamClass.WeakClassKey.
Comments
Fix-request (jdk18u): The change fixes a small memory leak, similar and related to JDK-8277072. The original change has baked for some weeks in JDK19 and applies cleanly. tier1-3 are passing fine.
16-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/899 Date: 2022-03-16 14:33:43 +0000
16-03-2022

Fix-request (jdk11u): The change fixes a small memory leak, similar and related to JDK-8277072. The original change has baked for some weeks in JDK19 and applies with some conflicts caused by different context. tier1&2 are passing fine, I will run some more testing soon.
16-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/260 Date: 2022-03-16 14:20:31 +0000
16-03-2022

Fix-request (jdk17u): The change fixes a small memory leak, similar and related to JDK-8277072. The original change has baked for some weeks in JDK19 and applies with some fuzz, but no conflicts. tier1&2 are passing fine, I will run some more testing soon.
16-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18u/pull/50 Date: 2022-03-16 14:06:40 +0000
16-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/886 Date: 2022-03-14 10:41:32 +0000
14-03-2022

Changeset: 8fed8ab2 Author: Roman Kennke <rkennke@openjdk.org> Date: 2022-01-12 13:47:25 +0000 URL: https://git.openjdk.java.net/jdk/commit/8fed8ab29cae4f189f44609c23f116967eef6bdf
12-01-2022