6759775: RegularFileObject.inferBinaryName gives bad result on empty path
authorjjg
Thu Oct 16 07:30:13 2008 -0700 (17 months ago)
changeset 145173162d6eb1d
parent 1444feda9f0dbe7
child 1462c1ef6ec9413
6759775: RegularFileObject.inferBinaryName gives bad result on empty path
Reviewed-by: mcimadamore
src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
--- a/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java Wed Oct 15 13:20:03 2008 -0700
+++ b/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java Thu Oct 16 07:30:13 2008 -0700
@@ -89,6 +89,8 @@ class RegularFileObject extends BaseFile
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())