From a22fc004dee42b0c0d52439b5486c8b02e4bd2b4 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Fri, 17 Apr 2015 22:50:10 -0400 Subject: [PATCH] 8077308: Fix warning: increase O_BUFLEN in ostream.hpp -- output truncated Reviewed-by: dholmes, hseigel --- hotspot/src/share/vm/utilities/ostream.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/utilities/ostream.cpp b/hotspot/src/share/vm/utilities/ostream.cpp index b187f7a029f..d87dbd98b34 100644 --- a/hotspot/src/share/vm/utilities/ostream.cpp +++ b/hotspot/src/share/vm/utilities/ostream.cpp @@ -978,8 +978,13 @@ void defaultStream::start_log() { 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"); }