cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1340902 - /cxf/trunk/api/src/main/java/org/apache/cxf/helpers/XPathUtils.java
Date Mon, 21 May 2012 06:44:44 GMT
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) {



Mime
View raw message