< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java

Print this page
rev 10947 : 8055723: Replace concat String to append in StringBuilder parameters

@@ -2946,12 +2946,12 @@
                 htmlStr.append("<html>\n<body>\n<ul>\n");
 
                 for (int i = 0; i < values.length; i++) {
                     Object obj = values[i];
                     String val = ((obj == null) ? "" : obj.toString());
-                    plainStr.append(val + "\n");
-                    htmlStr.append("  <li>" + val + "\n");
+                    plainStr.append(val).append('\n');
+                    htmlStr.append("  <li>").append(val).append('\n');
                 }
 
                 // remove the last newline
                 plainStr.deleteCharAt(plainStr.length() - 1);
                 htmlStr.append("</ul>\n</body>\n</html>");
< prev index next >