src/java.naming/share/classes/javax/naming/BinaryRefAddr.java

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

@@ -163,15 +163,15 @@
       * This string is meant to used for debugging purposes and not
       * meant to be interpreted programmatically.
       * @return The non-null string representation of this address.
       */
     public String toString(){
-        StringBuilder str = new StringBuilder("Address Type: " + addrType + "\n");
-
+        StringBuilder str = new StringBuilder();
+        str.append("Address Type: ").append(addrType).append('\n');
         str.append("AddressContents: ");
         for (int i = 0; i<buf.length && i < 32; i++) {
-            str.append(Integer.toHexString(buf[i]) +" ");
+            str.append(Integer.toHexString(buf[i])).append(' ');
         }
         if (buf.length >= 32)
             str.append(" ...\n");
         return (str.toString());
     }