Skip to content


Browse files Browse the repository at this point in the history
8220634: SymLinkArchiveTest should handle not being able to create sy…

Reviewed-by: phh
Backport-of: ab3f5e3
  • Loading branch information
cushon authored and RealCLanger committed Jan 17, 2022
1 parent a29949b commit 5ab97c4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/langtools/tools/javac/file/
Expand Up @@ -33,6 +33,7 @@
* @run main SymLinkArchiveTest

import java.nio.file.FileSystemException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down Expand Up @@ -69,7 +70,13 @@ public void testJarSymlink(Path base) throws Exception {
tb.writeFile(javaFile, "class T extends p.B {}");

Path jar = base.resolve("lib.jar");
Files.createSymbolicLink(jar, classpath.getFileName());
try {
Files.createSymbolicLink(jar, classpath.getFileName());
} catch (FileSystemException fse) {
System.err.println("warning: test passes vacuously, sym-link could not be created");

Result result = new JavacTask(tb).files(javaFile).classpath(jar).run(Expect.FAIL);
String output = result.getOutput(OutputKind.DIRECT);
Expand Down

1 comment on commit 5ab97c4

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.