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

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

*** 134,146 **** * Returns a formatted string describing the parameters. */ protected String engineToString() { String LINE_SEP = System.getProperty("line.separator"); HexDumpEncoder encoder = new HexDumpEncoder(); ! StringBuilder sb ! = new StringBuilder(LINE_SEP + " iv:" + LINE_SEP + "[" ! + encoder.encodeBuffer(iv) + "]"); ! ! sb.append(LINE_SEP + "tLen(bits):" + LINE_SEP + tLen*8 + LINE_SEP); return sb.toString(); } } --- 134,146 ---- * Returns a formatted string describing the parameters. */ protected String engineToString() { String LINE_SEP = System.getProperty("line.separator"); HexDumpEncoder encoder = new HexDumpEncoder(); ! StringBuilder sb = new StringBuilder(); ! sb.append(LINE_SEP).append(" iv:").append(LINE_SEP).append('[') ! .append(encoder.encodeBuffer(iv)).append(']').append(LINE_SEP) ! .append("tLen(bits):").append(LINE_SEP).append(tLen * 8) ! .append(LINE_SEP); return sb.toString(); } }