src/java.base/share/classes/java/security/cert/PolicyQualifierInfo.java

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

*** 156,173 **** * * @return a {@code String} describing the contents of this * {@code PolicyQualifierInfo} */ public String toString() { ! if (pqiString != null) return pqiString; HexDumpEncoder enc = new HexDumpEncoder(); StringBuilder sb = new StringBuilder(); sb.append("PolicyQualifierInfo: [\n"); ! sb.append(" qualifierID: " + mId + "\n"); ! sb.append(" qualifier: " + ! (mData == null ? "null" : enc.encodeBuffer(mData)) + "\n"); ! sb.append("]"); pqiString = sb.toString(); return pqiString; } } --- 156,175 ---- * * @return a {@code String} describing the contents of this * {@code PolicyQualifierInfo} */ public String toString() { ! if (pqiString != null) { return pqiString; + } HexDumpEncoder enc = new HexDumpEncoder(); StringBuilder sb = new StringBuilder(); sb.append("PolicyQualifierInfo: [\n"); ! sb.append(" qualifierID: ").append(mId).append('\n'); ! sb.append(" qualifier: ") ! .append(mData == null ? "null" : enc.encodeBuffer(mData)) ! .append('\n'); ! sb.append(']'); pqiString = sb.toString(); return pqiString; } }