RFR: 8292275: javac does not emit SYNTHETIC and MANDATED flags for parameters by default

Joe Darcy darcy at openjdk.org
Sat Aug 13 17:16:21 UTC 2022


On Sat, 13 Aug 2022 17:00:30 GMT, Hannes Greule <duke at openjdk.org> wrote:

> > Should the use of MANDATED be conditional on the target class file version?
> 
> I don't think this is needed. The JLS mentions the parameters of canonical record constructors in Java 14 already. Previous versions don't have records and shouldn't enter that method at all.

Agreed; I double-checked and the ACC_MANDATED flag was defined in that location since before JDK 14's format.

> 
> > I advise also writing a core reflection test that uses access flags (java.lang.reflect.AccessFlag).
> 
> Will do. I assume the `jdk/java/lang/reflect/AccessFlag` folder is a good place for that?

Yes; that an appropriate  home for such tests.

-------------

PR: https://git.openjdk.org/jdk/pull/9862



More information about the build-dev mailing list