----- Mail original -----
> De: "Alan Bateman" <[email protected]>
> À: "Remi Forax" <[email protected]>, "jigsaw-dev"
> <[email protected]>
> Envoyé: Dimanche 29 Mai 2016 21:49:40
> Objet: Re: javap and requires public
>
> On 29/05/2016 11:03, Remi Forax wrote:
> > Hi all, hi Jon,
> > i'm currently writing the ASM code for processing of the module-info.class
> > and i've found that the output of javap shallow the 'public' when a
> > required module is declared as public.
> >
> > By example, with the module-info.java
> > module foo {
> > export public java.sql;
> > }
> >
> > calling javap on the module-info.class output
> > module foo {
> > export java.sql;
> > }
> >
> Do you mean `requires`?
yes
>
> $ javap -c java.compact1/module-info.class
> Compiled from "module-info.java"
> module java.compact1 {
> requires java.base;
> requires public java.logging;
> requires public java.scripting;
> }
I've tested with a module-info generated by ASM and i've found the bug in ASM
or in the spec (see the paragraph below), ACC_PUBLIC for a module attribute
(0x0020) is not equals to ACC_PUBLIC (0x0001) for the rest of the classfile.
I strongly think it's a bug in the spec because i don't see why ACC_PUBLIC
should have a different value just for the access_flags of required. I've
checked the two others flags (SYNTHETIC and MANDATED) and they have the same
value as the rest of the class file.
regards,
Rémi