RFR: JDK-8193125: javac should not compile a module if it requires java.base with modifiers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: JDK-8193125: javac should not compile a module if it requires java.base with modifiers

Jonathan Gibbons
Please review a relatively simple change to javac, to track changes in
the JLS for JDK 10.

Source and class files that "require" java.base with either the static
or transitive modifiers will be rejected.

The code is complicated a bit for source files because of the different
ways of handling the two different modifiers. This affects both the
detection and the diagnostic generation.

The new test generates various source files and compiles them under
different source versions. It also uses the classfile library to
generate various classfiles via mutation to to be read by other files.

JBS: https://bugs.openjdk.java.net/browse/JDK-8193125
Webrev: http://cr.openjdk.java.net/~jjg/8193125/webrev.00

-- Jon


Reply | Threaded
Open this post in threaded view
|

Re: RFR: JDK-8193125: javac should not compile a module if it requires java.base with modifiers

Vicente Romero-2
looks good, some minor indentation issues but probably because of tabs

Thanks,
Vicente

On 01/02/2018 07:53 PM, Jonathan Gibbons wrote:

> Please review a relatively simple change to javac, to track changes in
> the JLS for JDK 10.
>
> Source and class files that "require" java.base with either the static
> or transitive modifiers will be rejected.
>
> The code is complicated a bit for source files because of the
> different ways of handling the two different modifiers. This affects
> both the detection and the diagnostic generation.
>
> The new test generates various source files and compiles them under
> different source versions. It also uses the classfile library to
> generate various classfiles via mutation to to be read by other files.
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8193125
> Webrev: http://cr.openjdk.java.net/~jjg/8193125/webrev.00
>
> -- Jon
>
>