src/java.base/share/classes/sun/security/provider/certpath/CertId.java

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

@@ -221,15 +221,15 @@
      * Create a string representation of the CertId.
      */
     @Override public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("CertId \n");
-        sb.append("Algorithm: " + hashAlgId.toString() +"\n");
+        sb.append("Algorithm: ").append(hashAlgId).append('\n');
         sb.append("issuerNameHash \n");
         HexDumpEncoder encoder = new HexDumpEncoder();
         sb.append(encoder.encode(issuerNameHash));
         sb.append("\nissuerKeyHash: \n");
         sb.append(encoder.encode(issuerKeyHash));
-        sb.append("\n" +  certSerialNumber.toString());
+        sb.append('\n').append(certSerialNumber);
         return sb.toString();
     }
 }