RFR(M): 8165896: Use "open" flag from JVM_DefineModule to export all module packages

Rachel Protacio rachel.protacio at oracle.com
Fri Apr 21 16:24:13 UTC 2017

Is there no chance someone will erroneously use initExportsAndOpens() in 
some other place and apply it to an open or automatic module? If not/if 
that wouldn't be a problem that's fine. Here's the updated changeset: 


On 4/21/2017 10:57 AM, Alan Bateman wrote:
> On 21/04/2017 15:05, Rachel Protacio wrote:
>> Hi,
>> The jlrM changes have synched into jdk10 and there were a few 
>> discrepancies from my earlier changesets, so these are slightly 
>> updated webrevs. (I also found an extra spot in the jdk repo that 
>> needed deleting.)
>> Re-tested with JPRT and RBT tiers 2-5.
>> hotspot webrev: http://cr.openjdk.java.net/~rprotacio/8165896.01/
>> jdk webrev: http://cr.openjdk.java.net/~rprotacio/8165896.jdk.01/
> For jl.Module then it would be cleared if defineModules is changed to:
> // export and open packages, skipped for open and automatic
> // modules as they as treated as if all packages are open
> if (!descriptor.isOpen() && !descriptor.isAutomatic()) {
>     initExportsAndOpens(m, nameToSource, nameToModule, layer.parents());
> }
> That allows you to remove the check from instead initExportsAndOpens.
> -Alan

More information about the hotspot-runtime-dev mailing list