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
This commit is contained in:
parent
5d112ff366
commit
91da35dbf2
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user