changeset 16218:5dbefe6fe4e4

8170633: backslashes in gensrc/module-info.java comments need escaping Reviewed-by: alanb, psandoz, wetmore
author mchung
date Fri, 02 Dec 2016 11:00:59 -0800
parents ea9502bce1a9
children 150206269f3f
files make/src/classes/build/tools/module/GenModuleInfoSource.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/src/classes/build/tools/module/GenModuleInfoSource.java	Fri Dec 02 10:05:53 2016 -0800
+++ b/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;
                 }