You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by bl...@apache.org on 2004/04/17 06:27:37 UTC
cvs commit: xml-security/src/org/apache/xml/security/signature XMLSignatureInput.java
blautenb 2004/04/16 21:27:36
Modified: src/org/apache/xml/security/signature XMLSignatureInput.java
Log:
More speed improvements from Raul (raul-info@r-bg.com) posted to list 17 April 2004
Revision Changes Path
1.25 +12 -5 xml-security/src/org/apache/xml/security/signature/XMLSignatureInput.java
Index: XMLSignatureInput.java
===================================================================
RCS file: /home/cvs/xml-security/src/org/apache/xml/security/signature/XMLSignatureInput.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- XMLSignatureInput.java 8 Feb 2004 06:11:19 -0000 1.24
+++ XMLSignatureInput.java 17 Apr 2004 04:27:36 -0000 1.25
@@ -88,7 +88,7 @@
System.arraycopy(inputOctets, 0, copy, 0, inputOctets.length);
this._inputOctetStreamProxy = new ByteArrayInputStream(copy);
- this._cxpathAPI = new CachedXPathAPI();
+ //this._cxpathAPI = new CachedXPathAPI();
}
/**
@@ -182,7 +182,7 @@
* @param inputNodeSet
*/
public XMLSignatureInput(Set inputNodeSet) {
- this(inputNodeSet, new CachedXPathAPI());
+ this(inputNodeSet, null);
}
/**
@@ -231,6 +231,11 @@
DocumentBuilder db = dfactory.newDocumentBuilder();
+ // select all nodes, also the comments.
+ if (this._cxpathAPI==null) {
+ this._cxpathAPI=new CachedXPathAPI();
+ }
+
try {
db.setErrorHandler(new org.apache.xml.security.utils
.IgnoreAllErrorHandler());
@@ -239,7 +244,6 @@
XMLUtils.circumventBug2650(doc);
- // select all nodes, also the comments.
NodeList nodeList =
this._cxpathAPI
.selectNodeList(doc,
@@ -451,6 +455,9 @@
* @return an existing {@link org.apache.xpath.CachedXPathAPI}
*/
public CachedXPathAPI getCachedXPathAPI() {
+ if (this._cxpathAPI == null) {
+ this._cxpathAPI = new CachedXPathAPI();
+ }
return this._cxpathAPI;
}