PrintStream.java (print): Handle null string argument.

* java/io/PrintStream.java (print): Handle null string argument.
	(println): Likewise.

From-SVN: r26294
This commit is contained in:
Tom Tromey 1999-04-08 11:41:01 +00:00 committed by Tom Tromey
parent 36ba9cb8d2
commit e086449d2a
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
1999-04-08 Tom Tromey <tromey@cygnus.com>
* java/io/PrintStream.java (print): Handle null string argument.
(println): Likewise.
1999-04-07 Warren Levy <warrenl@cygnus.com>
* java/lang/natString.cc (init(jbyteArray,jint,jint,jstring)):

View File

@ -99,7 +99,7 @@ public class PrintStream extends FilterOutputStream
public void print (String str)
{
print (str, true);
print (str == null ? "null" : str, true);
}
public void print (char ch)
@ -157,7 +157,7 @@ public class PrintStream extends FilterOutputStream
public void println (String str)
{
print (str, false);
print (str == null ? "null" : str, false);
println ();
}