6759775: RegularFileObject.inferBinaryName gives bad result on empty path

Thu, 16 Oct 2008 07:30:13 -0700

author
jjg
date
Thu, 16 Oct 2008 07:30:13 -0700
changeset 144
173162d6eb1d
parent 143
4feda9f0dbe7
child 145
2c1ef6ec9413

6759775: RegularFileObject.inferBinaryName gives bad result on empty path
Reviewed-by: mcimadamore

src/share/classes/com/sun/tools/javac/file/RegularFileObject.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Wed Oct 15 13:20:03 2008 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Thu Oct 16 07:30:13 2008 -0700
     1.3 @@ -89,6 +89,8 @@
     1.4          for (File dir: path) {
     1.5              //System.err.println("dir: " + dir);
     1.6              String dPath = dir.getPath();
     1.7 +            if (dPath.length() == 0)
     1.8 +                dPath = System.getProperty("user.dir");
     1.9              if (!dPath.endsWith(File.separator))
    1.10                  dPath += File.separator;
    1.11              if (fPath.regionMatches(true, 0, dPath, 0, dPath.length())

mercurial