JDK 14 record type representation in classfile format?

Luke Hutchison luke.hutch at gmail.com
Fri Mar 27 18:19:09 UTC 2020


On Sun, Mar 22, 2020 at 10:06 AM Remi Forax <forax at univ-mlv.fr> wrote:

> To me, it seems to be needed for the separate compilation,
> when javac reads the type of a class members that contains a '$', it has
> no idea if it's an inner class or not,
> the attributes InnerClasses is there to disambiguate.
>

But the java.lang.invoke.MethodHandles$Lookup class itself contains an
InnerClasses attribute with the mapping of innerClass =
"java.lang.invoke.MethodHandles$Lookup", outerClass =
"java.lang.invoke.MethodHandles". So the JRE can resolve this by looking at
the Lookup itself, which logically should be the intent.

I don't see why this information would need to be duplicated in every class
that needs access to the Lookup class due to the use of bootstrap methods.
That does not seem right to me.


More information about the amber-dev mailing list