You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by em...@apache.org on 2012/05/21 08:44:44 UTC
svn commit: r1340902 -
/cxf/trunk/api/src/main/java/org/apache/cxf/helpers/XPathUtils.java
Author: ema
Date: Mon May 21 06:44:44 2012
New Revision: 1340902
URL: http://svn.apache.org/viewvc?rev=1340902&view=rev
Log:
[CXF-4326]:Remove the XPathFactory.newInstance from XPathUtils' constructor to improve the performance a bit
Modified:
cxf/trunk/api/src/main/java/org/apache/cxf/helpers/XPathUtils.java
Modified: cxf/trunk/api/src/main/java/org/apache/cxf/helpers/XPathUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/helpers/XPathUtils.java?rev=1340902&r1=1340901&r2=1340902&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/helpers/XPathUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/helpers/XPathUtils.java Mon May 21 06:44:44 2012
@@ -35,10 +35,13 @@ import org.apache.cxf.common.classloader
public class XPathUtils {
- private XPath xpath;
+
+ private static XPathFactory xpathFactory = XPathFactory.newInstance();
+ private XPath xpath;
+
public XPathUtils() {
- xpath = XPathFactory.newInstance().newXPath();
+ xpath = xpathFactory.newXPath();
}
public XPathUtils(final Map<String, String> ns) {