< prev index next >

src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.java

Print this page
rev 10947 : 8055723: Replace concat String to append in StringBuilder parameters

*** 86,96 **** //for name component for (int j = 0; (k = DN.indexOf(',', j)) >= 0; j = k + 1) { l += countQuotes(DN, j, k); if ((k > 0) && (DN.charAt(k - 1) != '\\') && (l % 2) == 0) { ! sb.append(parseRDN(DN.substring(i, k).trim(), toXml) + ","); i = k + 1; l = 0; } } --- 86,96 ---- //for name component for (int j = 0; (k = DN.indexOf(',', j)) >= 0; j = k + 1) { l += countQuotes(DN, j, k); if ((k > 0) && (DN.charAt(k - 1) != '\\') && (l % 2) == 0) { ! sb.append(parseRDN(DN.substring(i, k).trim(), toXml)).append(','); i = k + 1; l = 0; } }
*** 119,129 **** for (int j = 0; (k = str.indexOf('+', j)) >= 0; j = k + 1) { l += countQuotes(str, j, k); if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) { ! sb.append(parseATAV(trim(str.substring(i, k)), toXml) + "+"); i = k + 1; l = 0; } } --- 119,129 ---- for (int j = 0; (k = str.indexOf('+', j)) >= 0; j = k + 1) { l += countQuotes(str, j, k); if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) { ! sb.append(parseATAV(trim(str.substring(i, k)), toXml)).append('+'); i = k + 1; l = 0; } }
*** 367,377 **** StringBuilder sb = new StringBuilder(); int i = 0; int k; for (int j = 0; (k = string.indexOf("\\20", j)) >= 0; j = k + 3) { ! sb.append(trim(string.substring(i, k)) + "\\ "); i = k + 3; } sb.append(string.substring(i)); --- 367,377 ---- StringBuilder sb = new StringBuilder(); int i = 0; int k; for (int j = 0; (k = string.indexOf("\\20", j)) >= 0; j = k + 3) { ! sb.append(trim(string.substring(i, k))).append("\\ "); i = k + 3; } sb.append(string.substring(i));
*** 416,426 **** for (int j = 0; (k = str.indexOf(symbol, j)) >= 0; j = k + 1) { l += countQuotes(str, j, k); if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) { ! sb.append(trim(str.substring(i, k)) + replace); i = k + 1; l = 0; } } --- 416,426 ---- for (int j = 0; (k = str.indexOf(symbol, j)) >= 0; j = k + 1) { l += countQuotes(str, j, k); if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) { ! sb.append(trim(str.substring(i, k))).append(replace); i = k + 1; l = 0; } }
< prev index next >