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
2 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue