This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: minor java.io spec fixes


I'm checking this in to the trunk and the 3.3 branch.

This changes a few methods in java.io to have the correct throws
specification.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java/io/PipedOutputStream.java (flush): Declare as throwing
	IOException.
	(close): Likewise.
	* java/io/PipedWriter.java (close): Declare as throwing
	IOException.
	* java/io/StringWriter.java (close): Declare as throwing
	IOException.

Index: java/io/PipedOutputStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/PipedOutputStream.java,v
retrieving revision 1.7
diff -u -r1.7 PipedOutputStream.java
--- java/io/PipedOutputStream.java 26 Dec 2002 01:21:25 -0000 1.7
+++ java/io/PipedOutputStream.java 4 Feb 2003 20:53:49 -0000
@@ -1,5 +1,5 @@
 /* PipedOutputStream.java -- Write portion of piped streams.
-   Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -154,7 +154,7 @@
     *           had read all available data. Thats not the case - this method
     *           appears to be a no-op?
     */
-  public void flush()
+  public void flush() throws IOException
   {
   }
   
@@ -165,7 +165,7 @@
     *
     * @exception IOException If an error occurs
     */
-  public void close()
+  public void close() throws IOException
   {
     // A close call on an unconnected PipedOutputStream has no effect.
     if (sink != null)
Index: java/io/PipedWriter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/PipedWriter.java,v
retrieving revision 1.8
diff -u -r1.8 PipedWriter.java
--- java/io/PipedWriter.java 24 Dec 2002 14:56:53 -0000 1.8
+++ java/io/PipedWriter.java 4 Feb 2003 20:53:49 -0000
@@ -1,5 +1,5 @@
 /* PipedWriter.java -- Write portion of piped character streams.
-   Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -166,7 +166,7 @@
     *
     * @exception IOException If an error occurs
     */
-  public void close()
+  public void close() throws IOException
   {
     // A close call on an unconnected PipedWriter has no effect.
     if (sink != null)
Index: java/io/StringWriter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/StringWriter.java,v
retrieving revision 1.4
diff -u -r1.4 StringWriter.java
--- java/io/StringWriter.java 22 Jan 2002 22:26:59 -0000 1.4
+++ java/io/StringWriter.java 4 Feb 2003 20:53:49 -0000
@@ -1,5 +1,5 @@
 /* StringWriter.java -- Writes bytes to a StringBuffer
-   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -61,7 +61,7 @@
    * This method closes the stream.  The contents of the internal buffer
    * can still be retrieved, but future writes are not guaranteed to work.
    */
-  public void close ()
+  public void close () throws IOException
   {
     // JCL says this does nothing.  This seems to violate the Writer
     // contract, in that other methods should still throw an


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]