jdk/src/java.logging/share/classes/java/util/logging/Logger.java
changeset 26961 8203ecb092af
parent 25859 3317bb8137f4
child 27074 4abca40e7d0c
--- a/jdk/src/java.logging/share/classes/java/util/logging/Logger.java	Tue Oct 07 14:00:24 2014 +0400
+++ b/jdk/src/java.logging/share/classes/java/util/logging/Logger.java	Tue Oct 07 14:49:45 2014 +0200
@@ -1376,8 +1376,12 @@
            return;
         }
         if (!isLoggable(Level.FINER)) return;
-        for (int i = 0; i < params.length; i++) {
-            msg = msg + " {" + i + "}";
+        if (params.length > 0) {
+            final StringBuilder b = new StringBuilder(msg);
+            for (int i = 0; i < params.length; i++) {
+                b.append(' ').append('{').append(i).append('}');
+            }
+            msg = b.toString();
         }
         logp(Level.FINER, sourceClass, sourceMethod, msg, params);
     }