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

Alex Buckley alex.buckley at oracle.com
Thu Jul 12 18:24:01 UTC 2018


I also thought the CSR was good. I modified the clause about passing 
`--add-reads mb=ma`, because adding `requires ma;` to mb is also a valid 
choice.

The release note talks of "source module" and "target module". While 
it's possible to figure out which is which, it's rather tricky for a 
compiler release note to use "source module" to mean something other 
than "the source code of a module, not its class files". I have taken 
the liberty of changing "source module" to "exporting module" in the 
release note. (No need to mention a `requires` directive in this short, 
command-line release note.)

Alex

On 7/12/2018 7:53 AM, Vicente Romero wrote:
> both looks good, I made some minimal format changes to the CSR,
>
> Vicente
>
> On 07/12/2018 10: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