Nest host validation vs NestHost attribute performed by Lookup::defineHiddenClass

David Holmes david.holmes at oracle.com
Tue Oct 1 22:27:49 UTC 2019


Hi Remi,

On 2/10/2019 8:02 am, Remi Forax wrote:
> ----- Mail original -----
>> De: "John Rose" <john.r.rose at oracle.com>
>> À: "Peter Levart" <peter.levart at gmail.com>
>> Cc: "valhalla-dev" <valhalla-dev at openjdk.java.net>
>> Envoyé: Mardi 1 Octobre 2019 23:38:31
>> Objet: Re: Nest host validation vs NestHost attribute performed by Lookup::defineHiddenClass
> 
>> On Oct 1, 2019, at 3:42 AM, Peter Levart <peter.levart at gmail.com> wrote:
>>>
>>> ...what is the reason for Class.getNestMembers() for not being dynamic?
>>
>> I think you answer your own question in the next sentences:  It’s an expensive luxury.
> 
> it's also unnecessary given that you have Class.isNestmateOf() which works with dynamically added nest members,
> so instead of using getNestMembers() and re-implement the access checks, you can directly ask the VM if is a class is a nest member of a nest host.

I'm not sure what point you are making. Using isNestMateOf might be 
useful if you are implementing an access check in Java, but it doesn't 
help with any access check implemented inside the VM.

David
-----

> Rémi
> 


More information about the valhalla-dev mailing list