cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject svn commit: r1149218 - in /cxf/branches/2.3.x-fixes: ./ common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
Date Thu, 21 Jul 2011 15:16:40 GMT
Author: asoldano
Date: Thu Jul 21 15:16:37 2011
New Revision: 1149218

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

................
  r1149190 | asoldano | 2011-07-21 16:16:25 +0200 (Thu, 21 Jul 2011) | 9 lines
  
  Merged revisions 1149183 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1149183 | asoldano | 2011-07-21 15:57:33 +0200 (Thu, 21 Jul 2011) | 2 lines
    
    [CXF-3675] Applying patch to get DocumentBuilderFactory instances from XMLUtils, which
keeps a classloader based map of them
  ........
................

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

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 21 15:16:37 2011
@@ -1,2 +1,2 @@
-/cxf/branches/2.4.x-fixes:1144979,1147505,1148964
-/cxf/trunk:1144977,1147504,1148962
+/cxf/branches/2.4.x-fixes:1144979,1147505,1148964,1149190
+/cxf/trunk:1144977,1147504,1148962,1149183

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

Modified: cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java?rev=1149218&r1=1149217&r2=1149218&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
(original)
+++ cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
Thu Jul 21 15:16:37 2011
@@ -60,21 +60,11 @@ import org.apache.cxf.common.util.String
  * @author Costin Manolache
  */
 public final class DOMUtils {
-    private static final DocumentBuilderFactory FACTORY = DocumentBuilderFactory.newInstance();
-    private static DocumentBuilder builder;
     private static final String XMLNAMESPACE = "xmlns";
 
     private DOMUtils() {
     }
 
-    private static synchronized DocumentBuilder getBuilder() throws ParserConfigurationException
{
-        if (builder == null) {
-            FACTORY.setNamespaceAware(true);
-            builder = FACTORY.newDocumentBuilder();
-        }
-        return builder;
-    }
-
     /**
      * This function is much like getAttribute, but returns null, not "", for a nonexistent
attribute.
      * 
@@ -494,7 +484,7 @@ public final class DOMUtils {
 
     public static DocumentBuilder createDocumentBuilder() {
         try {
-            return FACTORY.newDocumentBuilder();
+            return XMLUtils.getParser();
         } catch (ParserConfigurationException e) {
             throw new RuntimeException("Couldn't find a DOM parser.", e);
         }
@@ -502,7 +492,7 @@ public final class DOMUtils {
 
     public static Document createDocument() {
         try {
-            return getBuilder().newDocument();
+            return XMLUtils.getParser().newDocument();
         } catch (ParserConfigurationException e) {
             throw new RuntimeException("Couldn't find a DOM parser.", e);
         }



Mime
View raw message