--- old/src/java.base/share/classes/com/sun/crypto/provider/DHPublicKey.java 2014-08-26 11:19:49.000000000 +0800 +++ new/src/java.base/share/classes/com/sun/crypto/provider/DHPublicKey.java 2014-08-26 11:19:48.000000000 +0800 @@ -260,16 +260,18 @@ public String toString() { String LINE_SEP = System.getProperty("line.separator"); - StringBuilder sb - = new StringBuilder("SunJCE Diffie-Hellman Public Key:" - + LINE_SEP + "y:" + LINE_SEP - + Debug.toHexString(this.y) - + LINE_SEP + "p:" + LINE_SEP - + Debug.toHexString(this.p) - + LINE_SEP + "g:" + LINE_SEP - + Debug.toHexString(this.g)); - if (this.l != 0) - sb.append(LINE_SEP + "l:" + LINE_SEP + " " + this.l); + StringBuilder sb = new StringBuilder(); + sb.append("SunJCE Diffie-Hellman Public Key:").append(LINE_SEP) + .append("y:").append(LINE_SEP) + .append(Debug.toHexString(this.y)).append(LINE_SEP) + .append("p:").append(LINE_SEP) + .append(Debug.toHexString(this.p)) + .append(LINE_SEP + "g:" + LINE_SEP) + .append(Debug.toHexString(this.g)); + if (this.l != 0) { + sb.append(LINE_SEP).append("l:").append(LINE_SEP).append(" ") + .append(this.l); + } return sb.toString(); }