RFR: 8279917: Refactor subclassAudits in Thread to use ClassValue
Andrey Turbanov
duke at openjdk.java.net
Thu Jan 13 10:05:24 UTC 2022
On Wed, 12 Jan 2022 19:39:29 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> Thread.java would benefit from a refactoring similar to JDK-8278065 to use ClassValue instead of the somewhat problematic WeakClassKey mechanism.
>
> Testing:
> - [x] tier1
> - [x] tier2
> - [x] tier3
src/java.base/share/classes/java/lang/Thread.java line 1671:
> 1669: /** cache of subclass security audit results */
> 1670: /* Replace with ConcurrentReferenceHashMap when/if it appears in a future
> 1671: * release */
Is it still desirable to use `ConcurrentReferenceHashMap` as suggested in comment? Or ClassValue is better choice?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7054
More information about the core-libs-dev
mailing list