changeset 30251:9b05c9cc4698

8077308: Fix warning: increase O_BUFLEN in ostream.hpp -- output truncated Reviewed-by: dholmes, hseigel Contributed-by: Andrew Haley <aph@redhat.com>
author dholmes
date Fri, 17 Apr 2015 22:50:10 -0400
parents 58f6fc816aae
children b9faf31ff015
files hotspot/src/share/vm/utilities/ostream.cpp
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/utilities/ostream.cpp	Fri Apr 17 23:55:04 2015 +0000
+++ b/hotspot/src/share/vm/utilities/ostream.cpp	Fri Apr 17 22:50:10 2015 -0400
@@ -978,8 +978,13 @@
       xs->head("properties");
       // Print it as a java-style property list.
       // System properties don't generally contain newlines, so don't bother with unparsing.
+      outputStream *text = xs->text();
       for (SystemProperty* p = Arguments::system_properties(); p != NULL; p = p->next()) {
-        xs->text()->print_cr("%s=%s", p->key(), p->value());
+        // Print in two stages to avoid problems with long
+        // keys/values.
+        text->print_raw(p->key());
+        text->put('=');
+        text->print_raw_cr(p->value());
       }
       xs->tail("properties");
     }