2003-10-22 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Wed, 22 Oct 2003 08:47:12 +0000 (08:47 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Wed, 22 Oct 2003 08:47:12 +0000 (08:47 +0000)
* java/io/File.java
(equals): Removed redundant obj == null check.
(createTempFile): Merged comments from classpath.

From-SVN: r72790

libjava/ChangeLog
libjava/java/io/File.java

index aa3f79ec8c39e4153fa47260f76db35dd8b9e338..7f53a362564079ee04b1c27fb3fb0218885957da 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-22  Michael Koch  <konqueror@gmx.de>
+
+       * java/io/File.java
+       (equals): Removed redundant obj == null check.
+       (createTempFile): Merged comments from classpath.
+
 2003-10-21  Sascha Brawer  <brawer@dandelis.ch>
 
        Fix for bug #2944, reported by David Holmes <dholmes@dltech.com.au>
index 4800ba15c18eb56a01ca1f0a76beaa1791f67621..b4951ecc806725646fd2d9155e0eac4774c143ea 100644 (file)
@@ -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";