--- a/langtools/test/tools/javac/modules/UpgradeModulePathTest.java Wed Dec 14 20:23:26 2016 +0000
+++ b/langtools/test/tools/javac/modules/UpgradeModulePathTest.java Fri Dec 16 05:47:58 2016 +0000
@@ -38,7 +38,6 @@
import toolbox.JavacTask;
import toolbox.ModuleBuilder;
import toolbox.Task;
-import toolbox.ToolBox;
public class UpgradeModulePathTest extends ModuleTestBase {
@@ -50,19 +49,19 @@
@Test
public void simpleUsage(Path base) throws Exception {
Path modules = base.resolve("modules");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg1")
.classes("package pkg1; public class E { }")
.build(modules);
final Path upgradeModules = base.resolve("upgradeModules");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg2")
.classes("package pkg2; public class E { }")
.build(upgradeModules);
Path src = base.resolve("src");
- tb.writeJavaFiles(src, "module m2 { requires m1; }",
+ tb.writeJavaFiles(src, "module m2x { requires m1x; }",
"package p; class A { void main() { pkg2.E.class.getName(); } }");
new JavacTask(tb, Task.Mode.CMDLINE)
@@ -76,19 +75,19 @@
@Test
public void onlyUpgradeModulePath(Path base) throws Exception {
final Path module = base.resolve("modules");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg1")
.classes("package pkg1; public class E { }")
.build(module);
final Path upgradeModule = base.resolve("upgradeModule");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg2")
.classes("package pkg2; public class E { }")
.build(upgradeModule);
Path src = base.resolve("src");
- tb.writeJavaFiles(src, "module m2 { requires m1; }",
+ tb.writeJavaFiles(src, "module m2x { requires m1x; }",
"package p; class A { void main() { pkg2.E.class.getName(); } }");
new JavacTask(tb, Task.Mode.CMDLINE)
@@ -101,28 +100,28 @@
@Test
public void withModuleSourcePath(Path base) throws Exception {
final Path module = base.resolve("modules");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg1")
.classes("package pkg1; public class E { }")
.build(module);
final Path upgradeModule = base.resolve("upgradeModule");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg2")
.classes("package pkg2; public class E { }")
.build(upgradeModule);
final Path s = base.resolve("source");
- tb.writeJavaFiles(s.resolve("m3"), "module m3 { }");
+ tb.writeJavaFiles(s.resolve("m3x"), "module m3x { }");
final Path upgradeModule3 = base.resolve("upgradeModule");
- new ModuleBuilder(tb, "m3")
+ new ModuleBuilder(tb, "m3x")
.exports("pkg3")
.classes("package pkg3; public class E { }")
.build(upgradeModule);
Path src = base.resolve("src");
- tb.writeJavaFiles(src.resolve("m2"), "module m2 { requires m1; requires m3; }",
+ tb.writeJavaFiles(src.resolve("m2x"), "module m2x { requires m1x; requires m3x; }",
"package p; class A { void main() { pkg2.E.class.getName(); } }");
new JavacTask(tb, Task.Mode.CMDLINE)
@@ -138,19 +137,19 @@
@Test
public void sameUpgradeAndModulePath(Path base) throws Exception {
final Path module = base.resolve("modules");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg1")
.classes("package pkg1; public class E { }")
.build(module);
final Path upgradeModule = base.resolve("upgradeModule");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg2")
.classes("package pkg2; public class E { }")
.build(upgradeModule);
Path src = base.resolve("src");
- tb.writeJavaFiles(src, "module m2 { requires m1; }",
+ tb.writeJavaFiles(src, "module m2x { requires m1x; }",
"package p; class A { void main() { pkg2.E.class.getName(); } }");
new JavacTask(tb, Task.Mode.CMDLINE)
@@ -164,7 +163,7 @@
@Test
public void dummyFileInUpgradeModulePath(Path base) throws Exception {
final Path module = base.resolve("modules");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg1")
.classes("package pkg1; public class E { }")
.build(module);
@@ -173,7 +172,7 @@
tb.writeFile(dummy, "");
Path src = base.resolve("src");
- tb.writeJavaFiles(src, "module m2 { requires m1; }",
+ tb.writeJavaFiles(src, "module m2x { requires m1x; }",
"package p; class A { void main() { pkg2.E.class.getName(); } }");
String output = new JavacTask(tb, Task.Mode.CMDLINE)
@@ -192,28 +191,28 @@
@Test
public void severalUpgradeModules(Path base) throws Exception {
final Path module = base.resolve("modules");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg1")
.classes("package pkg1; public class A { }")
.build(module);
- new ModuleBuilder(tb, "m2")
+ new ModuleBuilder(tb, "m2x")
.exports("pkg2")
.classes("package pkg2; public class B { }")
.build(module);
Path upgradeModule = base.resolve("upgradeModule");
- new ModuleBuilder(tb, "m2")
+ new ModuleBuilder(tb, "m2x")
.exports("pkg2")
.classes("package pkg2; public class BC { }")
.build(upgradeModule);
- new ModuleBuilder(tb, "m3")
+ new ModuleBuilder(tb, "m3x")
.exports("pkg3")
.classes("package pkg3; public class DC { }")
.build(upgradeModule);
Path src = base.resolve("src");
- tb.writeJavaFiles(src, "module m4 { requires m1; requires m2; requires m3; }",
+ tb.writeJavaFiles(src, "module m4x { requires m1x; requires m2x; requires m3x; }",
"package p; class A { void main() { pkg1.A.class.getName(); pkg2.BC.class.getName(); pkg3.DC.class.getName(); } }");
new JavacTask(tb, Task.Mode.CMDLINE)
@@ -224,7 +223,7 @@
.writeAll();
Path src2 = base.resolve("src2");
- tb.writeJavaFiles(src2, "module m4 { requires m1; }",
+ tb.writeJavaFiles(src2, "module m4x { requires m1x; }",
"package p; class A { void main() { pkg2.B.class.getName(); } }");
String log = new JavacTask(tb, Task.Mode.CMDLINE)
@@ -243,25 +242,25 @@
@Test
public void severalUpgradeModulePathsLastWin(Path base) throws Exception {
final Path module = base.resolve("modules");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg1")
.classes("package pkg1; public class E { }")
.build(module);
final Path upgradeModule1 = base.resolve("upgradeModule1");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg2")
.classes("package pkg2; public class EC1 { }")
.build(upgradeModule1);
final Path upgradeModule2 = base.resolve("upgradeModule2");
- new ModuleBuilder(tb, "m1")
+ new ModuleBuilder(tb, "m1x")
.exports("pkg2")
.classes("package pkg2; public class EC2 { }")
.build(upgradeModule2);
Path src = base.resolve("src");
- tb.writeJavaFiles(src, "module m2 { requires m1; }",
+ tb.writeJavaFiles(src, "module m2x { requires m1x; }",
"package p; class A { void main() { pkg2.EC2.class.getName(); } }");
new JavacTask(tb, Task.Mode.CMDLINE)
@@ -273,7 +272,7 @@
.writeAll();
Path src2 = base.resolve("src2");
- tb.writeJavaFiles(src2, "module m2 { requires m1; }",
+ tb.writeJavaFiles(src2, "module m2x { requires m1x; }",
"package p; class A { void main() { pkg2.EC1.class.getName(); } }");
final String log = new JavacTask(tb, Task.Mode.CMDLINE)