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 09:08:17 UTC

svn commit: r1340907 - in /cxf/branches/2.4.x-fixes: ./ common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java

Author: ema
Date: Mon May 21 07:08:17 2012
New Revision: 1340907

URL: http://svn.apache.org/viewvc?rev=1340907&view=rev
Log:
Merged revisions 1340903 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1340903 | ema | 2012-05-21 14:57:55 +0800 (Mon, 21 May 2012) | 1 line
  
  [CXF-4326]:Remove the XPathFactory.newInstance from XPathUtils' constructor to improve the performance a bit
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.5.x-fixes:r1340903

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java?rev=1340907&r1=1340906&r2=1340907&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java (original)
+++ cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XPathUtils.java Mon May 21 07:08:17 2012
@@ -31,10 +31,13 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
 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) {
@@ -76,3 +79,4 @@ public class XPathUtils {
     }
 
 }
+