changeset 197:30276d468815

Fix PluginDebug regression.
author dlila
date Fri, 01 Apr 2011 12:57:18 -0400
parents 1d604ccd9b6b
children 62011060e7ea
files ChangeLog plugin/icedteanp/java/sun/applet/PluginDebug.java
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Mar 31 18:19:31 2011 -0400
+++ b/ChangeLog	Fri Apr 01 12:57:18 2011 -0400
@@ -1,3 +1,8 @@
+2011-04-01  Denis Lila  <dlila@redhat.com>
+
+	* plugin/icedteanp/java/sun/applet/PluginDebug.java: 
+	(debug): Use StringBuilder to build the string.
+
 2011-03-31  Omair Majid  <omajid@redhat.com>
 
 	* netx/net/sourceforge/jnlp/Launcher.java: Add parserSettings and extra.
--- a/plugin/icedteanp/java/sun/applet/PluginDebug.java	Thu Mar 31 18:19:31 2011 -0400
+++ b/plugin/icedteanp/java/sun/applet/PluginDebug.java	Fri Apr 01 12:57:18 2011 -0400
@@ -43,9 +43,14 @@
 
     public static void debug(Object... messageChunks) {
         if (DEBUG) {
+            if (messageChunks == null) {
+                messageChunks = new Object[] {null};
+            }
+            StringBuilder b = new StringBuilder();
             for (Object chunk : messageChunks) {
-                System.err.println(chunk.toString());
+                b.append(chunk);
             }
+            System.err.println(b.toString());
         }
     }
 }