--- old/src/java.base/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java 2014-08-21 20:46:09.000000000 +0800 +++ new/src/java.base/share/classes/sun/security/ssl/SupportedEllipticCurvesExtension.java 2014-08-21 20:46:08.000000000 +0800 @@ -112,37 +112,37 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("Extension " + type + ", curve names: {"); - boolean first = true; - for (int curveId : curveIds) { - if (first) { - first = false; - } else { - sb.append(", "); - } - // first check if it is a known named curve, then try other cases. - String oid = getCurveOid(curveId); - if (oid != null) { - ECParameterSpec spec = JsseJce.getECParameterSpec(oid); - // this toString() output will look nice for the current - // implementation of the ECParameterSpec class in the Sun - // provider, but may not look good for other implementations. - if (spec != null) { - sb.append(spec.toString().split(" ")[0]); - } else { - sb.append(oid); - } - } else if (curveId == ARBITRARY_PRIME) { - sb.append("arbitrary_explicit_prime_curves"); - } else if (curveId == ARBITRARY_CHAR2) { - sb.append("arbitrary_explicit_char2_curves"); - } else { - sb.append("unknown curve " + curveId); - } - } - sb.append("}"); - return sb.toString(); + StringBuilder sb = new StringBuilder(); + sb.append("Extension ").append(type).append(", curve names: {"); + boolean first = true; + for (int curveId : curveIds) { + if (first) { + first = false; + } else { + sb.append(", "); + } + // first check if it is a known named curve, then try other cases. + String oid = getCurveOid(curveId); + if (oid != null) { + ECParameterSpec spec = JsseJce.getECParameterSpec(oid); + // this toString() output will look nice for the current + // implementation of the ECParameterSpec class in the Sun + // provider, but may not look good for other implementations. + if (spec != null) { + sb.append(spec.toString().split(" ")[0]); + } else { + sb.append(oid); + } + } else if (curveId == ARBITRARY_PRIME) { + sb.append("arbitrary_explicit_prime_curves"); + } else if (curveId == ARBITRARY_CHAR2) { + sb.append("arbitrary_explicit_char2_curves"); + } else { + sb.append("unknown curve ").append(curveId); + } + } + sb.append("}"); + return sb.toString(); } // Test whether we support the curve with the given index.