< prev index next >

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

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

@@ -233,17 +233,18 @@
                 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() + "\"");
+                        sb.append(' ').append(nodeName).append("=\"")
+                                .append(att.getNodeValue()).append('"');
                         storedNamespaces.put(nodeName, att.getNodeValue());
                     }
                 }
             }
             wk = wk.getParentNode();
         }
-        sb.append(">" + source + "</dummy>");
+        sb.append('>').append(source).append("</dummy>");
         return sb.toString();
     }
 
 }
< prev index next >