JDK 14 record type representation in classfile format?
Remi Forax
forax at univ-mlv.fr
Sat Mar 21 18:00:04 UTC 2020
Hi Luke,
wrong mailing list,
record being a preview feature, the right mailing list is amber-dev at openjdk.java.net.
(please remove jdk-dev if you reply)
----- Mail original -----
> De: "Luke Hutchison" <luke.hutch at gmail.com>
> À: "jdk-dev" <jdk-dev at openjdk.java.net>
> Envoyé: Samedi 21 Mars 2020 18:40:41
> Objet: JDK 14 record type representation in classfile format?
> How are JDK 14 record types encoded in the classfile format? There is an
> 8-byte class attribute named "Record", but the format of this attribute is
> not documented in the JDK 14 classfile format specification (presumably
> because this feature is still in preview).
if you to go at
https://docs.oracle.com/javase/specs/
there is a link just below the JVM spec about record because as you said, it's a preview feature
https://docs.oracle.com/javase/specs/jvms/se14/preview/specs/records-jvms.html
and yes, there is a Record attribute see section 4.7.30.
>
> Also, records have an "InnerClasses" class attribute, with an inner class
> name of "java.lang.invoke.MethodHandles$Lookup" and an outer class name of
> "java.lang.invoke.MethodHandles". Normally the outer class name matches the
> class whose classfile the attribute is contained in. Why is this inner
> class attribute there, and why does the outer class name not match the name
> of the record?
This look like a bug to me.
regards,
Rémi
More information about the amber-dev
mailing list