8164550: tools/javac/modules/InheritRuntimeEnvironmentTest.java fails on Windows after JDK-8153391
Summary: Empty classpath is not working on Windows; using a classpath consisting on a sole empty dir
Reviewed-by: mcimadamore
--- a/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java Mon Aug 22 09:59:43 2016 +0200
+++ b/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java Mon Aug 22 15:16:30 2016 +0200
@@ -123,13 +123,17 @@
.files(findJavaFiles(src))
.run();
+ Path emptyClassPath = base.resolve("emptyClassPath");
+
+ Files.createDirectories(emptyClassPath);
+
// This is the test, to verify that the module being compiled will not be able to read
// modules on the module path when a --limit-modules is used
new TestCase(base)
.testOpts("--module-path", modules.toString(), "--limit-modules", "jdk.compiler")
.otherOpts("-XDrawDiagnostics",
"--module-source-path", src.toString(),
- "-classpath", "")
+ "-classpath", emptyClassPath.toString())
.files(findJavaFiles(src))
.expect(Task.Expect.FAIL, "compiler.err.module.not.found")
.run();