RFR(11): JDK-8207032: Compilation succeeds without checking readability when --add-exports used

Jan Lahoda jan.lahoda at oracle.com
Thu Jul 12 14:04:15 UTC 2018


Currently, when --add-exports is used, javac will inject the exported 
packages into the target module's visible packages even if the target 
module is not reading the source module. So that even if the target 
module does not read the source module, it can use the packages exported 
using --add-exports, which is not intended. The fix is to check 
readability before adding the packages into the list of visible packages.

Bug: https://bugs.openjdk.java.net/browse/JDK-8207032
Webrev: http://cr.openjdk.java.net/~jlahoda/8207032/webrev.00/
CSR: https://bugs.openjdk.java.net/browse/JDK-8207175


More information about the compiler-dev mailing list