Author: ema
Date: Mon May 21 06:57:55 2012
New Revision: 1340903

URL: http://svn.apache.org/viewvc?rev=1340903&view=rev
Log:
[CXF-4326]:Remove the XPathFactory.newInstance from XPathUtils' constructor to 
improve the performance a bit

Modified:
    
cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java

Modified: 
cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java?rev=1340903&r1=1340902&r2=1340903&view=diff
==============================================================================
--- 
cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java
 (original)
+++ 
cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java
 Mon May 21 06:57:55 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) {
@@ -82,3 +85,4 @@ public class XPathUtils {
     }
 
 }
+


Reply via email to