Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
/ jdk20 Public archive

Commit

Permalink
8298463: tools/javac/modules/EdgeCases.java fails on Windows after JD…
Browse files Browse the repository at this point in the history
…K-8297988

Reviewed-by: jjg
  • Loading branch information
lahodaj committed Dec 9, 2022
1 parent b7b996c commit 52fffdd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/langtools/tools/javac/modules/EdgeCases.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.io.BufferedWriter;
import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
Expand Down Expand Up @@ -1079,6 +1080,7 @@ void t() {
tb.createDirectories(classes);

record TestCase(Path[] files, String... expectedLog){}
String nameSeparator = FileSystems.getDefault().getSeparator();

TestCase[] testCases = new TestCase[] {
new TestCase(new Path[] {m.resolve("module-info.java")},
Expand Down Expand Up @@ -1133,7 +1135,9 @@ public void finished(TaskEvent e) {
}
private void record(TaskEvent e, String phase) {
JavaFileObject source = e.getSourceFile();
String sourceName = source != null ? source.getName() : "<none>";
String sourceName = source != null ? source.getName()
.replace(nameSeparator, "/")
: "<none>";
log.add(e.getKind() + ":" + phase + ":" + sourceName);
}
});
Expand Down

1 comment on commit 52fffdd

@openjdk-notifier
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.