On Mon, 29 Aug 2022 12:10:48 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

>> src/hotspot/share/classfile/protectionDomainCache.cpp line 43:
>> 
>>> 41: 
>>> 42: unsigned int ProtectionDomainCacheTable::compute_hash(const WeakHandle& 
>>> protection_domain) {
>>> 43:   return (unsigned int)(protection_domain.resolve()->identity_hash());
>> 
>> And if it is a `WeakHandle` can't `resolve` now return NULL?
>
> compute_hash() is always called on a live WeakHandle so will never return 
> null.

I think you should add an assert that the `protection_domain.resolve()` never 
returns null, with a comment explaining why.

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

PR: https://git.openjdk.org/jdk/pull/10043

Reply via email to