jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1079314 - /jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java
Date Tue, 08 Mar 2011 10:29:24 GMT
Author: jukka
Date: Tue Mar  8 10:29:24 2011
New Revision: 1079314

URL: http://svn.apache.org/viewvc?rev=1079314&view=rev
Log:
JCR-2904: Uncaught AbstractMethodError exception in in DomUtil.createFactory()

Fix based on a patch by John Langley.

Modified:
    jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java?rev=1079314&r1=1079313&r2=1079314&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java
Tue Mar  8 10:29:24 2011
@@ -70,13 +70,27 @@ public class DomUtil {
         factory.setCoalescing(true);
         try {
             factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-        } catch (ParserConfigurationException e) {
+        } catch (Exception e) {
             log.warn("Secure XML processing is not supported", e);
         }
         return factory;
     }
 
     /**
+     * Support the replacement of {@link #BUILDER_FACTORY}. This is useful
+     * for injecting a customized BuilderFactory, for example with one that
+     * uses a local catalog resolver. This is one technique for addressing
+     * this issue:
+     * http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic
+     *
+     * @param documentBuilderFactory
+     */
+    public static void setBuilderFactory(
+            DocumentBuilderFactory documentBuilderFactory) {
+        BUILDER_FACTORY = documentBuilderFactory;
+    }
+
+    /**
      * Transformer factory
      */
     private static TransformerFactory TRANSFORMER_FACTORY = TransformerFactory.newInstance();



Mime
View raw message