RFR: 8159523. Fix tests depending on absence of -limitmods in VM arguments.

Alexandre (Shura) Iline alexandre.iline at oracle.com
Tue Nov 1 17:31:57 UTC 2016


Alan,

For me, having module and package parameters separate makes it a lot easier:
public JavaTask addExports(String module, String package, String… targetModules)

Consider this:
.addExports(JAVA_BASE, JDK_MISC, ALL_UNNAMED)
where, needless to say, JAVA_BASE and JDK_MISC  are constants defined in the test, or, perhaps, library class and presumably used in other cases.

To me, this is better for obvious reasons, such as code completion in IDE and compile-time control over the mistakes. I also will be able to avoid concatenation all over the code: 
.addExports(JAVA_BASE + “/“ + JDK_MISC, ALL_UNNAMED)

Similarly, for the same reasons, I prefer
.addExports(JAVA_BASE, JDK_MISC, M1, M2)



What do others think? 

To get everybody on the same page, we are discussing this webrev, which is introducing new task builder API to the JDK test library: http://cr.openjdk.java.net/~shurailine/8159523/webrev.04

This is the review request:
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-October/009627.html

Shura




> On Nov 1, 2016, at 3:26 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> 
> 
> On 01/11/2016 10:23, Alan Bateman wrote:
>> :
>> 
>> .addExports("java.base", "jdk.internal.misc=ALL-UNNAMED")
>> .addOpens("java.base", "jdk.internal.misc=m1,m2")
> Oops, a typo here, I meant this of course:
> 
> .addExports("java.base/jdk.internal.misc", "ALL-UNNAMED")
> .addOpens("java.base/jdk.internal.misc", m1,m2")
> 
> -Alan.



More information about the core-libs-dev mailing list