src/java.base/share/classes/com/sun/crypto/provider/OAEPParameters.java

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

@@ -237,12 +237,14 @@
         return engineGetEncoded();
     }
 
     protected String engineToString() {
         StringBuilder sb = new StringBuilder();
-        sb.append("MD: " + mdName + "\n");
-        sb.append("MGF: MGF1" + mgfSpec.getDigestAlgorithm() + "\n");
-        sb.append("PSource: PSpecified " +
-            (p.length==0? "":Debug.toHexString(new BigInteger(p))) + "\n");
+        sb.append("MD: ").append(mdName).append('\n');
+        sb.append("MGF: MGF1").append(mgfSpec.getDigestAlgorithm())
+                .append('\n');
+        sb.append("PSource: PSpecified ")
+                .append(p.length == 0 ? "" : Debug
+                        .toHexString(new BigInteger(p))).append('\n');
         return sb.toString();
     }
 }