This is the mail archive of the java-patches@sources.redhat.com 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]

Patch: OutputStreamWriter.close fix


I'm checking this in.  It changes OutputStreamWriter.close so that it
only calls `flush' if the writer isn't already closed.

2000-07-27  Tom Tromey  <tromey@cygnus.com>

	* java/io/OutputStreamWriter.java (close): Only flush if not
	closed.

Tom

Index: java/io/OutputStreamWriter.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/io/OutputStreamWriter.java,v
retrieving revision 1.7
diff -u -r1.7 OutputStreamWriter.java
--- OutputStreamWriter.java	2000/03/07 19:55:26	1.7
+++ OutputStreamWriter.java	2000/07/28 02:52:44
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -55,9 +55,9 @@
   {
     synchronized (lock)
       {
-	flush();
 	if (out != null)
 	  {
+	    flush();
 	    out.close();
 	    out = null;
 	  }

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