File.java (File(String, String)): For dirPath, treat an empty String the same as...
authorBryce McKinlay <bryce@albatross.co.nz>
Sun, 27 Feb 2000 10:43:47 +0000 (10:43 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Sun, 27 Feb 2000 10:43:47 +0000 (10:43 +0000)
2000-02-27  Bryce McKinlay  <bryce@albatross.co.nz>

       * java/io/File.java (File(String, String)): For dirPath, treat an
       empty String the same as `null'.

From-SVN: r32217

libjava/ChangeLog
libjava/java/io/File.java

index ccf334665d1f3df23fc58f502183a4315ff26103..70dcc678be960f3cc6dc2defb42bd61417306c79 100644 (file)
@@ -1,3 +1,8 @@
+2000-02-27  Bryce McKinlay  <bryce@albatross.co.nz>
+
+       * java/io/File.java (File(String, String)): For dirPath, treat an
+       empty String the same as `null'.
+
 2000-02-26  Anthony Green  <green@cygnus.com>
 
        * gnu/gcj/io/MimeTypes.java: Test for null.
index 184c5e0a7f9b84fc49a8354c4dd342aab1fdd0bf..c4a4e39a19df25d03553f491e04c67fa67cdd404 100644 (file)
@@ -79,7 +79,7 @@ public class File implements Serializable
   {
     if (name == null)
       throw new NullPointerException ();
-    if (dirPath != null)
+    if (dirPath != null && dirPath.length() > 0)
       {
        // Try to be smart about the number of separator characters.
        if (dirPath.charAt(dirPath.length() - 1) == separatorChar)