RFR: 8209633: Avoid creating WeakEntry wrappers when looking up cached MethodType

Claes Redestad claes.redestad at oracle.com
Fri Aug 17 14:32:41 UTC 2018


Hi Peter,

On 2018-08-17 16:04, Peter Levart wrote:
> Hi Claes,
>
> Nice trick.

thanks!

> You made MethodType(s) and WeakEntry(s) holding them equal, respecting 
> the equals()/hashCode() contract. When WeakEntry looses the referent 
> it is left equal to itself only, which is enough for expunging it from 
> map.

Good summary. Do you think we need a few comments to spell out these 
intricacies?

/Claes


More information about the core-libs-dev mailing list