On Fri, 2 Sep 2022 05:26:45 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> // The ProtectionDomainCacheTable maps all java.security.ProtectionDomain >> objects that are >> // registered by DictionaryEntry::add_protection_domain() to a unique entry. >> The entry >> // is a WeakHandle that holds the protection domain oop. >> >> or points to.... either is accurate. > > It is the "maps ... to a unique entry" that I find most problematic - it begs > the question as to what the unique entry is, when in reality it maps a PD > instance (wrapped in a WeakHandle) to itself (wrapped in a WeakHandle). > > For the sake of progress, approved. The "unique" means there's only one value in the table for this protection domain oop. So the oop is unique. The use of word "mapping" might be what's confusing. If we ever have to visit this code again (which I hope not, except to remove it because the security manager is finally removed since not many use it), we can see if this comment still makes sense to at least some of us. Thanks for approving for progress. ------------- PR: https://git.openjdk.org/jdk/pull/10043