Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Java 1.5.2, Java 1.5.3
-
Security Level: Public (Public issues, viewable by everyone)
Description
In working on the Santuario port to GenXDM, I discovered that the serialization code for the org.apache.jcp.xml.dsig.internal.dom package turns out to be highly repetitive.
For example, code like this:
Document ownerDoc = DOMUtils.getOwnerDocument(parent);
// prepend namespace prefix, if necessary
Element knElem = DOMUtils.createElement(ownerDoc, "KeyName",
XMLSignature.XMLNS, dsPrefix);
knElem.appendChild(ownerDoc.createTextNode(name));
parent.appendChild(knElem);
can be replaced by:
xwriter.writeTextElement(dsPrefix, "KeyName", XMLSignature.XMLNS, keyName.getName());
... which both reduces the amount of code, and better exposes the intent.
Attachments
Attachments
Issue Links
- is related to
-
SANTUARIO-501 Backout patch for SANTUARIO-349
- Closed