< prev index next >
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
Print this page
rev 10947 : 8055723: Replace concat String to append in StringBuilder parameters
@@ -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>");
< prev index next >