diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-08 11:41:01 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-08 11:41:01 +0000 |
commit | 3102f1df0caddaad91c769efc8b74388f2afd69f (patch) | |
tree | 2627143b6a7e61ff51a68fe6be54b6461468a01b /libjava | |
parent | b7ecc820e8b0ed2b1036d521543bdc619d4cf911 (diff) | |
download | gcc-3102f1df0caddaad91c769efc8b74388f2afd69f.tar.gz |
* java/io/PrintStream.java (print): Handle null string argument.
(println): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26294 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/io/PrintStream.java | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 1d3bb42afcf..eaeff0b0edb 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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)): diff --git a/libjava/java/io/PrintStream.java b/libjava/java/io/PrintStream.java index 499e5eb7059..96a5a6e81de 100644 --- a/libjava/java/io/PrintStream.java +++ b/libjava/java/io/PrintStream.java @@ -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 (); } |