Nest host validation vs NestHost attribute performed by Lookup::defineHiddenClass
forax at univ-mlv.fr
Tue Oct 1 22:02:04 UTC 2019
----- 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.
More information about the valhalla-dev