OSDN Git Service

2005-04-23 Jeroen Frijters <jeroen@frijters.net>
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 23 Apr 2005 11:20:14 +0000 (11:20 +0000)
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 23 Apr 2005 11:20:14 +0000 (11:20 +0000)
* java/io/FileInputStream.java (FileInputStream(File)),
java/io/FileOutputStream.java (FileOutputStream(File)):
Removed unnecessary File.isDirectory() check.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98607 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/io/FileInputStream.java
libjava/java/io/FileOutputStream.java

index 93159b5..8f2c254 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-23  Jeroen Frijters  <jeroen@frijters.net>
+
+       * java/io/FileInputStream.java (FileInputStream(File)),
+       java/io/FileOutputStream.java (FileOutputStream(File)):
+       Removed unnecessary File.isDirectory() check.
+
 2005-04-22  Bryce McKinlay  <mckinlay@redhat.com>
 
        * testsuite/lib/libjava.exp (libjava_find_gij): Use $objdir/.. to find
index 17aaf79..ebd5d20 100644 (file)
@@ -105,9 +105,6 @@ public class FileInputStream extends InputStream
     if (s != null)
       s.checkRead(file.getPath());
 
-    if (file.isDirectory())
-      throw new FileNotFoundException(file.getPath() + " is a directory");
-
     ch = new FileChannelImpl (file.getPath(), FileChannelImpl.READ);
   }
 
index 34b06cb..d5fa2d3 100644 (file)
@@ -155,10 +155,7 @@ public class FileOutputStream extends OutputStream
     if (s != null)
       s.checkWrite(file.getPath());
 
-    if (file.isDirectory())
-      throw new FileNotFoundException(file.getPath() + " is a directory");
-
-   ch = new FileChannelImpl (file.getPath(), (append
+    ch = new FileChannelImpl (file.getPath(), (append
                                     ? FileChannelImpl.WRITE
                                     | FileChannelImpl.APPEND
                                     : FileChannelImpl.WRITE));