mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-06-16 00:16:04 +00:00
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:
committed by
Bryce McKinlay
parent
5d112ff366
commit
91da35dbf2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user