changeset 5092:3d91d5d7b166

fixed segv encountered while printing system property with a NULL value
author Doug Simon <doug.simon@oracle.com>
date Fri, 16 Mar 2012 18:25:30 +0100
parents 54819cdcca7f
children ba5e8ba07b5c
files src/share/vm/utilities/ostream.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/utilities/ostream.cpp	Fri Mar 16 14:48:15 2012 +0100
+++ b/src/share/vm/utilities/ostream.cpp	Fri Mar 16 18:25:30 2012 +0100
@@ -616,9 +616,9 @@
       // Print it as a java-style property list.
       // System properties don't generally contain newlines, so don't bother with unparsing.
       for (SystemProperty* p = Arguments::system_properties(); p != NULL; p = p->next()) {
-        xs->text()->print(p->key());
+        xs->text()->print(p->key() ? p->key() : "");
         xs->text()->print("=");
-        xs->text()->print_cr(p->value());
+        xs->text()->print_cr(p->value() ? p->value() : "");
       }
       xs->tail("properties");
     }