src/java.desktop/share/classes/javax/swing/RepaintManager.java

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

@@ -988,14 +988,11 @@
      * object's properties.
      *
      * @return a String representation of this object
      */
     public synchronized String toString() {
-        StringBuilder sb = new StringBuilder();
-        if(dirtyComponents != null)
-            sb.append("" + dirtyComponents);
-        return sb.toString();
+        return dirtyComponents != null ? dirtyComponents.toString() : "";
     }
 
 
     /**
      * Return the offscreen buffer that should be used as a double buffer with