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

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Jul 12 22:31:59 UTC 2018


-- Jon

On 07/12/2018 07:04 AM, Jan Lahoda wrote:
> Hi,
> 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
> Thanks,
>     Jan

More information about the compiler-dev mailing list