[core-libs] RFR (L): 8010319: Implementation of JEP 181: Nest-Based Access Control (original) (raw)

Peter Levart peter.levart at gmail.com
Tue May 22 10:50:09 UTC 2018


On 05/22/2018 12:36 PM, Peter Levart wrote:

This would not penalize access to package-private and protected members with areNestMates() JNI calls and maybe caching will not be needed at all.

But if caching may need to be performed, then the simplest form of nestmate access check caching would be the caching of getNestHost() result inside the Class object. This need not be in the ReflectiveData object, but directly in the Class object as the invariant is that all members of the nest share the same package and consequently the same defining ClassLoader - there would be no ClassLoader leak(s) possible by keeping a hard reference to the cached nest-host Class object in each Class...

Regards, Peter



More information about the core-libs-dev mailing list