Commit 91da35db by Bryce McKinlay Committed by Bryce McKinlay

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

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
parent 5d112ff3
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> 2000-02-26 Anthony Green <green@cygnus.com>
* gnu/gcj/io/MimeTypes.java: Test for null. * gnu/gcj/io/MimeTypes.java: Test for null.
......
...@@ -79,7 +79,7 @@ public class File implements Serializable ...@@ -79,7 +79,7 @@ public class File implements Serializable
{ {
if (name == null) if (name == null)
throw new NullPointerException (); throw new NullPointerException ();
if (dirPath != null) if (dirPath != null && dirPath.length() > 0)
{ {
// Try to be smart about the number of separator characters. // Try to be smart about the number of separator characters.
if (dirPath.charAt(dirPath.length() - 1) == separatorChar) if (dirPath.charAt(dirPath.length() - 1) == separatorChar)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment