> De: "Brian Goetz" <brian.go...@oracle.com> > À: "Remi Forax" <fo...@univ-mlv.fr> > Cc: "amber-spec-experts" <amber-spec-experts@openjdk.java.net>, "joe darcy" > <joe.da...@oracle.com>, "Vicente Romero" <vicente.rom...@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