On Sat, 13 Aug 2022 17:00:30 GMT, Hannes Greule <[email protected]> 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

Reply via email to