src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java

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

@@ -1161,19 +1161,19 @@
 
         if(rowMapper != null)
             rows = rowMapper.getRowsForPaths(selection);
         else
             rows = null;
-        sb.append(getClass().getName() + " " + hashCode() + " [ ");
+        sb.append(getClass().getName()).append(' ').append(hashCode()).append(" [ ");
         for(int counter = 0; counter < selCount; counter++) {
             if(rows != null)
-                sb.append(selection[counter].toString() + "@" +
-                          Integer.toString(rows[counter])+ " ");
+                sb.append(selection[counter]).append('@')
+                        .append(rows[counter]).append(' ');
             else
-                sb.append(selection[counter].toString() + " ");
+                sb.append(selection[counter]).append(' ');
         }
-        sb.append("]");
+        sb.append(']');
         return sb.toString();
     }
 
     /**
      * Returns a clone of this object with the same selection.