FileInputStream.java (FileInputStream(File)), java/io/FileOutputStream.java (FileOutputStream(File)): Removed unnecessary File.isDirectory() check.

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.

From-SVN: r98607
This commit is contained in:
Jeroen Frijters 2005-04-23 11:20:14 +00:00 committed by Michael Koch
parent 3876ed1631
commit 528e5d8bce
3 changed files with 7 additions and 7 deletions

View 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> 2005-04-22 Bryce McKinlay <mckinlay@redhat.com>
* testsuite/lib/libjava.exp (libjava_find_gij): Use $objdir/.. to find * testsuite/lib/libjava.exp (libjava_find_gij): Use $objdir/.. to find

View file

@ -105,9 +105,6 @@ public class FileInputStream extends InputStream
if (s != null) if (s != null)
s.checkRead(file.getPath()); s.checkRead(file.getPath());
if (file.isDirectory())
throw new FileNotFoundException(file.getPath() + " is a directory");
ch = new FileChannelImpl (file.getPath(), FileChannelImpl.READ); ch = new FileChannelImpl (file.getPath(), FileChannelImpl.READ);
} }

View file

@ -155,9 +155,6 @@ public class FileOutputStream extends OutputStream
if (s != null) if (s != null)
s.checkWrite(file.getPath()); 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.WRITE
| FileChannelImpl.APPEND | FileChannelImpl.APPEND