getPermittedSubclasses() on j.l.rClass returning an array of ClassDesc

forax at univ-mlv.fr forax at univ-mlv.fr
Sat May 9 17:12:23 UTC 2020


> De: "Brian Goetz" <brian.goetz at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>, "joe darcy"
> <joe.darcy at oracle.com>, "Vicente Romero" <vicente.romero at oracle.com>
> Envoyé: Samedi 9 Mai 2020 17:52:44
> Objet: Re: getPermittedSubclasses() on j.l.rClass returning an array of
> ClassDesc

>> Moreover, it's not a new problem, getNestMembers() has exactly the same issue
>> and nestmates have the same kind of lazy validation, the VM doesn't check
>> nestmate attributes untile an access orccurs.
>> So piggybacking on what getNestMembers() do seems a good idea.

> This is a "for consistency" argument. Bu: ClassDesc did not exist at the time we
> did nestmates! We were pretty unhappy about triggering loading on that one too,
> but we didn't see a good alternative at the time.

> So "let's do the same thing as something we hated doing in a different
> situation, for consistency" is not the best of arguments :)
I was no thinking about consistency here, not from a user POV, 
it's more about runtime behavior of the VM being pretty similar in term of checking when checking nestmate access or if a subtype is allowed by all its supertypes. 

Rémi 


More information about the amber-spec-observers mailing list