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]

D'oh!


Committed as obvious.

Andrew.


2003-08-07  Andrew Haley  <aph@redhat.com>

	* java/io/PrintStream.java (print(String)): Don't crash on a null
	string.
	
Index: PrintStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/PrintStream.java,v
retrieving revision 1.21
diff -u -r1.21 PrintStream.java
--- PrintStream.java	28 Jun 2003 08:27:29 -0000	1.21
+++ PrintStream.java	7 Aug 2003 15:45:08 -0000
@@ -256,7 +256,7 @@
   {
     pw.print (str);
 
-    if (auto_flush)
+    if (str != null && auto_flush)
       if ((str.indexOf ('\r') != -1)
           || (str.indexOf ('\n') != -1))
         flush ();


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