jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java
changeset 24969 afa6934dd8e8
parent 14342 8435a30053c1
child 25522 10d789df41bb
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java	Mon Jun 16 17:45:26 2014 +0100
@@ -827,17 +827,17 @@
     private static String addArgument(String string, String argument) {
         if (hasWhitespace(argument) || argument.indexOf(',') != -1) {
             // Quotes were stripped out for this argument, add 'em back.
-            StringBuffer buffer = new StringBuffer(string);
-            buffer.append('"');
+            StringBuilder sb = new StringBuilder(string);
+            sb.append('"');
             for (int i = 0; i < argument.length(); i++) {
                 char c = argument.charAt(i);
                 if (c == '"') {
-                    buffer.append('\\');
+                    sb.append('\\');
                 }
-                buffer.append(c);
+                sb.append(c);
             }
-            buffer.append("\" ");
-            return buffer.toString();
+            sb.append("\" ");
+            return sb.toString();
         } else {
             return string + argument + ' ';
         }