--- 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);
}