aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@albatross.co.nz>2000-02-27 10:43:47 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2000-02-27 10:43:47 +0000
commit91da35dbf2e8ef070bfe07125a71dc522610dcdd (patch)
treebcd54e99a88cd44c72ca6788e743ef4d317e354a /libjava
parent5d112ff36680fd5ef196df0ceaa562d46f5d20f5 (diff)
downloadgcc-91da35dbf2e8ef070bfe07125a71dc522610dcdd.zip
gcc-91da35dbf2e8ef070bfe07125a71dc522610dcdd.tar.gz
gcc-91da35dbf2e8ef070bfe07125a71dc522610dcdd.tar.bz2
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
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/io/File.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index ccf3346..70dcc67 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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.
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java
index 184c5e0..c4a4e39 100644
--- a/libjava/java/io/File.java
+++ b/libjava/java/io/File.java
@@ -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)