Alan,

> On Oct 26, 2016, at 12:53 PM, Alexandre (Shura) Iline 
> <alexandre.il...@oracle.com> wrote:
> 
> 
>> On Oct 26, 2016, at 12:00 PM, Alan Bateman <alan.bate...@oracle.com> wrote:
>> 
>> On 26/10/2016 19:33, Alexandre (Shura) Iline wrote:
>> 
>>> :
>>> Like this:
>>> http://cr.openjdk.java.net/~shurailine/8159523/webrev.04/
>>> 
>> It's all subjective but I prefer:
>> 
>> .addExports("java.base/jdk.internal.misc=ALL-UNNAMED")
>> .addExports("java.base/jdk.internal.reflect=ALL-UNNAMED")
>> 
>> to:
>> 
>> .addExports("java.base", "jdk.internal.misc")
>> .addExports("java.base", "jdk.internal.reflect")
>> 
>> only because I can immediately see what the packages are being exported to 
>> all unnamed modules.
> 
> Would this be better then?
> 
> .addExports("java.base", “jdk.internal.misc”, ALL_UNNAMED)
> .addExports("java.base", "jdk.internal.reflect”, ALL_UNNAMED)
> ?

Which syntax would be better?

1. Requiring explicit ALL-UNNAMED
.addExports("java.base", “jdk.internal.misc”, ALL_UNNAMED)
.addExports("java.base", "jdk.internal.reflect”, ALL_UNNAMED) 
2. Treating ALL-UNNAMED as a default
.addExports("java.base", “jdk.internal.misc”)
.addExports("java.base", "jdk.internal.reflect”) 

Same for addReads(…) and, I assume, addOpens(…).

With any of the two, I am in favor of removing addExports(String), 
addReads(String) and addOpens(String) methods. If a complete string parameter 
needs to be passed (such as for negative tests), it could be passed through the 
vmOptions(String …) method.

What do you think?

Shura
> 

> This is what I had in the previous version.
> 
> Shura
> 
>> 
>> -Alan
>> 
>> 
>> 
> 

Reply via email to