8170633: backslashes in gensrc/module-info.java comments need escaping

Reviewed-by: alanb, psandoz, wetmore
This commit is contained in:
Mandy Chung 2016-12-02 11:00:59 -08:00
parent c7da82e9c0
commit 75efb52ec8

View File

@ -146,9 +146,10 @@ public class GenModuleInfoSource {
for (String l : lines) {
writer.println(l);
if (l.trim().startsWith("module ")) {
writer.format(" // source file: %s%n", sourceFile);
// print URI rather than file path to avoid escape
writer.format(" // source file: %s%n", sourceFile.toUri());
for (Path file: extraFiles) {
writer.format(" // %s%n", file);
writer.format(" // %s%n", file.toUri());
}
break;
}