8164550: tools/javac/modules/InheritRuntimeEnvironmentTest.java fails on Windows after JDK-8153391
authorjlahoda
Mon, 22 Aug 2016 15:16:30 +0200
changeset 40514 fa42e8040550
parent 40513 39b67170b045
child 40515 819fc588bd19
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
langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java
--- 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();