6759775: RegularFileObject.inferBinaryName gives bad result on empty path
authorjjg
Thu, 16 Oct 2008 07:30:13 -0700
changeset 1479 e6dbb00a12d9
parent 1478 1847a080da9a
child 1480 a4a66a4c8d84
6759775: RegularFileObject.inferBinaryName gives bad result on empty path Reviewed-by: mcimadamore
langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
--- a/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Wed Oct 15 13:20:03 2008 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Thu Oct 16 07:30:13 2008 -0700
@@ -89,6 +89,8 @@
         for (File dir: path) {
             //System.err.println("dir: " + dir);
             String dPath = dir.getPath();
+            if (dPath.length() == 0)
+                dPath = System.getProperty("user.dir");
             if (!dPath.endsWith(File.separator))
                 dPath += File.separator;
             if (fPath.regionMatches(true, 0, dPath, 0, dPath.length())