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

Print this page
rev 10520 : 8055723[client]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>

@@ -3616,12 +3616,12 @@
                 for (TreePath path : displayPaths) {
                     Object node = path.getLastPathComponent();
                     boolean leaf = model.isLeaf(node);
                     String label = getDisplayString(path, true, leaf);
 
-                    plainStr.append(label + "\n");
-                    htmlStr.append("  <li>" + label + "\n");
+                    plainStr.append(label).append('\n');
+                    htmlStr.append("  <li>").append(label).append('\n');
                 }
 
                 // remove the last newline
                 plainStr.deleteCharAt(plainStr.length() - 1);
                 htmlStr.append("</ul>\n</body>\n</html>");