8170633: backslashes in gensrc/module-info.java comments need escaping
Reviewed-by: alanb, psandoz, wetmore
--- a/jdk/make/src/classes/build/tools/module/GenModuleInfoSource.java Fri Dec 02 10:05:53 2016 -0800
+++ b/jdk/make/src/classes/build/tools/module/GenModuleInfoSource.java Fri Dec 02 11:00:59 2016 -0800
@@ -146,9 +146,10 @@
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;
}