D'oh!

Andrew Haley aph@redhat.com
Thu Aug 7 15:54:00 GMT 2003


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 ();



More information about the Java-patches mailing list