On Wed, 27 Apr 2022 17:27:56 GMT, Mandy Chung <mch...@openjdk.org> wrote:
>> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > > src/java.base/share/classes/java/lang/PinnedThreadPrinter.java line 58: > >> 56: >> 57: // maps a class to the hashes of stack traces pinned by that code in >> that class >> 58: private static final Map<Class<?>, Hashes> classToHashes = new >> WeakHashMap<>(); > > Can you use `ClassValue` in this case? I was wondering that too, but held off commenting since it's not super performance critical given `classToHashes` is synchronized on. However, it does make the code a little clearer. ------------- PR: https://git.openjdk.java.net/jdk/pull/8166