src/java.desktop/share/classes/javax/swing/event/TreeModelEvent.java

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

@@ -292,24 +292,23 @@
      * @return a String representation of this object
      */
     public String toString() {
         StringBuilder   sb = new StringBuilder();
 
-        sb.append(getClass().getName() + " " +
-                  Integer.toString(hashCode()));
+        sb.append(getClass().getName()).append(' ').append(hashCode());
         if(path != null)
-            sb.append(" path " + path);
+            sb.append(" path ").append(path);
         if(childIndices != null) {
             sb.append(" indices [ ");
             for(int counter = 0; counter < childIndices.length; counter++)
-                sb.append(Integer.toString(childIndices[counter])+ " ");
-            sb.append("]");
+                sb.append(childIndices[counter]).append(' ');
+            sb.append(']');
         }
         if(children != null) {
             sb.append(" children [ ");
             for(int counter = 0; counter < children.length; counter++)
-                sb.append(children[counter] + " ");
-            sb.append("]");
+                sb.append(children[counter]).append(' ');
+            sb.append(']');
         }
         return sb.toString();
     }
 }