src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/encryption/AbstractSerializer.java

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

*** 233,249 **** for (int i = 0; i < atts.getLength(); ++i) { Node att = atts.item(i); String nodeName = att.getNodeName(); if ((nodeName.equals("xmlns") || nodeName.startsWith("xmlns:")) && !storedNamespaces.containsKey(att.getNodeName())) { ! sb.append(" " + nodeName + "=\"" + att.getNodeValue() + "\""); storedNamespaces.put(nodeName, att.getNodeValue()); } } } wk = wk.getParentNode(); } ! sb.append(">" + source + "</dummy>"); return sb.toString(); } } --- 233,250 ---- for (int i = 0; i < atts.getLength(); ++i) { Node att = atts.item(i); String nodeName = att.getNodeName(); if ((nodeName.equals("xmlns") || nodeName.startsWith("xmlns:")) && !storedNamespaces.containsKey(att.getNodeName())) { ! sb.append(' ').append(nodeName).append("=\"") ! .append(att.getNodeValue()).append('"'); storedNamespaces.put(nodeName, att.getNodeValue()); } } } wk = wk.getParentNode(); } ! sb.append('>').append(source).append("</dummy>"); return sb.toString(); } }