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

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Jan 3 00:53:26 UTC 2018


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




More information about the compiler-dev mailing list