Review Request: JDK-8170633 backslashes in, gensrc/module-info.java comments need escaping

2016-12-02 Thread Bradford Wetmore

> The build tool generating module-info.java includes the path name of
> the source files in the comment for diagnosis where backslash
> character needs escaping.  This patch prints URI rather than file
> path.

As submitter and having tested the build patch, looks good to me.

Brad



Re: Review Request: JDK-8170633 backslashes in gensrc/module-info.java comments need escaping

2016-12-02 Thread Alan Bateman



On 02/12/2016 17:39, Mandy Chung wrote:

The build tool generating module-info.java includes the path name of the source 
files in the comment for diagnosis where backslash character needs escaping.  
This patch prints URI rather than file path.



Putting the URI in the comment looks fine.

-Alan


Re: Review Request: JDK-8170633 backslashes in gensrc/module-info.java comments need escaping

2016-12-02 Thread Paul Sandoz

> On 2 Dec 2016, at 09:39, Mandy Chung  wrote:
> 
> The build tool generating module-info.java includes the path name of the 
> source files in the comment for diagnosis where backslash character needs 
> escaping.  This patch prints URI rather than file path.
> 

+1

Paul.

> Mandy
> 
> diff --git a/make/src/classes/build/tools/module/GenModuleInfoSource.java 
> b/make/src/classes/build/tools/module/GenModuleInfoSource.java
> --- a/make/src/classes/build/tools/module/GenModuleInfoSource.java
> +++ b/make/src/classes/build/tools/module/GenModuleInfoSource.java
> @@ -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;
> }
> 



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

2016-12-02 Thread Mandy Chung
The build tool generating module-info.java includes the path name of the source 
files in the comment for diagnosis where backslash character needs escaping.  
This patch prints URI rather than file path.

Mandy

diff --git a/make/src/classes/build/tools/module/GenModuleInfoSource.java 
b/make/src/classes/build/tools/module/GenModuleInfoSource.java
--- a/make/src/classes/build/tools/module/GenModuleInfoSource.java
+++ b/make/src/classes/build/tools/module/GenModuleInfoSource.java
@@ -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;
 }