RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v7]
David Holmes
dholmes at openjdk.org
Fri Sep 2 05:30:43 UTC 2022
On Thu, 1 Sep 2022 12:29:41 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Since I know what this table does, either comment is fine if it helps someone understand it.
>> The "map each PD to itself" is pretty odd to me too. How about collect each PD for fast lookup in a hashtable? The code says how it's mapped. There isn't that much code and it's easy to see how the Key is mapped.
>
> // 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.
-------------
PR: https://git.openjdk.org/jdk/pull/10043
More information about the serviceability-dev
mailing list