RFR: 8278065: Refactor subclassAudits to use ClassValue [v2]

Roman Kennke rkennke at openjdk.java.net
Fri Dec 10 16:31:45 UTC 2021


> As a follow-up to #6375, this change refactors java.io.ObjectInputStream.Caches#subclassAudits and java.io.ObjectOutputStream.Caches#subclassAudits to use ClassValue instead of SoftReference, similar to what we did in #6375 for java.io.ObjectStreamClass.Caches#localDescs. Then we can now also remove the common machinery java.io.ObjectStreamClass#processQueue and java.io.ObjectStreamClass.WeakClassKey.
> 
> Testing:
>  - [x] tier1
>  - [x] tier2
>  - [ ] tier3

Roman Kennke has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:

 - 8278065: Refactor subclassAudits to use ClassValue
 - Remove unused EntryFuture inner class from ObjectSteamClass
 - Merge remote-tracking branch 'jdk-plevart/JDK-8277072-peter' into JDK-8277072
 - Use ClassValue to solve JDK-8277072
 - Use ForceGC instead of System.gc()
 - Convert test to testng
 - Fix indentation of new testcase
 - 8277072: ObjectStreamClass caches keep ClassLoaders alive

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

Changes: https://git.openjdk.java.net/jdk/pull/6637/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6637&range=01
  Stats: 431 lines in 4 files changed: 115 ins; 273 del; 43 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6637.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6637/head:pull/6637

PR: https://git.openjdk.java.net/jdk/pull/6637


More information about the core-libs-dev mailing list