diff options
author | Michael Koch <konqueror@gmx.de> | 2003-10-22 08:47:12 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-10-22 08:47:12 +0000 |
commit | 8c754b9197ad1c39505a47854119f64276a4b22f (patch) | |
tree | 2966aef95114324ba8211abcc74ea550452f3da7 /libjava/java | |
parent | 65f1ebd15e4de8493f62a624ac5669bfbd300727 (diff) | |
download | gcc-8c754b9197ad1c39505a47854119f64276a4b22f.zip gcc-8c754b9197ad1c39505a47854119f64276a4b22f.tar.gz gcc-8c754b9197ad1c39505a47854119f64276a4b22f.tar.bz2 |
2003-10-22 Michael Koch <konqueror@gmx.de>
* java/io/File.java
(equals): Removed redundant obj == null check.
(createTempFile): Merged comments from classpath.
From-SVN: r72790
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/io/File.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java index 4800ba1..b4951ec 100644 --- a/libjava/java/io/File.java +++ b/libjava/java/io/File.java @@ -111,7 +111,7 @@ public class File implements Serializable, Comparable * is taken from the <code>path.separator</code> system property. */ public static final char pathSeparatorChar = pathSeparator.charAt(0); - + static final String tmpdir = System.getProperty("java.io.tmpdir"); static int maxPathLen; static boolean caseSensitive; @@ -246,9 +246,6 @@ public class File implements Serializable, Comparable */ public boolean equals (Object obj) { - if (obj == null) - return false; - if (! (obj instanceof File)) return false; @@ -1006,10 +1003,11 @@ public class File implements Serializable, Comparable + " is not really a directory."); } - // Now process the prefix and suffix. + // Check if prefix is at least 3 characters long if (prefix.length() < 3) throw new IllegalArgumentException ("Prefix too short: " + prefix); + // Set default value of suffix if (suffix == null) suffix = ".tmp"; |