This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FileOutputStream exceptions
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Subject: Patch: FileOutputStream exceptions
- From: Tom Tromey <tromey at redhat dot com>
- Date: 12 Jul 2001 10:00:13 -0600
- Reply-To: tromey at redhat dot com
A user pointed out to me that the FileOutputStream constructors throw
FileNotFoundException, not IOException. This patch fixes it.
I'm checking this in on the trunk.
2001-07-12 Tom Tromey <tromey@redhat.com>
Report from Henner Zeller:
* java/io/FileOutputStream.java (FileOutputStream): Throw
FileNotFoundException, not IOException.
Tom
Index: java/io/FileOutputStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/FileOutputStream.java,v
retrieving revision 1.3
diff -u -r1.3 FileOutputStream.java
--- java/io/FileOutputStream.java 2000/03/07 19:55:26 1.3
+++ java/io/FileOutputStream.java 2001/07/11 15:26:48
@@ -1,6 +1,6 @@
// FileOutputStream.java - Write bytes to a file.
-/* Copyright (C) 1998, 1999 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2001 Free Software Foundation
This file is part of libgcj.
@@ -23,7 +23,7 @@
public class FileOutputStream extends OutputStream
{
public FileOutputStream (String path, boolean append)
- throws SecurityException, IOException
+ throws SecurityException, FileNotFoundException
{
SecurityManager s = System.getSecurityManager();
if (s != null)
@@ -33,17 +33,20 @@
: FileDescriptor.WRITE));
}
- public FileOutputStream (String path) throws SecurityException, IOException
+ public FileOutputStream (String path)
+ throws SecurityException, FileNotFoundException
{
this (path, false);
}
- public FileOutputStream (File file) throws SecurityException, IOException
+ public FileOutputStream (File file)
+ throws SecurityException, FileNotFoundException
{
this (file.getPath(), false);
}
- public FileOutputStream (FileDescriptor fdObj) throws SecurityException
+ public FileOutputStream (FileDescriptor fdObj)
+ throws SecurityException
{
SecurityManager s = System.getSecurityManager();
if (s != null)