logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1521904 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
Date Wed, 11 Sep 2013 15:28:38 GMT
Author: rgoers
Date: Wed Sep 11 15:28:37 2013
New Revision: 1521904

URL: http://svn.apache.org/r1521904
Log:
LOG4J2-341 - Catch AbstractMethodError for missing implementation of setFeature

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java?rev=1521904&r1=1521903&r2=1521904&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
Wed Sep 11 15:28:37 2013
@@ -102,7 +102,6 @@ public class XMLConfiguration extends Ba
      * Enables XInclude for the given DocumentBuilderFactory
      *
      * @param factory a DocumentBuilderFactory
-     * @throws ParserConfigurationException
      */
     private static void enableXInclude(final DocumentBuilderFactory factory) {
         try {
@@ -111,6 +110,8 @@ public class XMLConfiguration extends Ba
             factory.setXIncludeAware(true);
         } catch (UnsupportedOperationException e) {
             LOGGER.warn("The DocumentBuilderFactory does not support XInclude: " + factory,
e);
+        } catch (AbstractMethodError err) {
+            LOGGER.warn("The DocumentBuilderFactory is out of date and does not support XInclude:
" + factory);
         }
         try {
             // Alternative: We could specify all features and values with system properties
like:
@@ -119,12 +120,16 @@ public class XMLConfiguration extends Ba
         } catch (ParserConfigurationException e) {
             LOGGER.warn("The DocumentBuilderFactory [" + factory + "] does not support the
feature ["
                     + XINCLUDE_FIXUP_BASE_URIS + "]", e);
+        } catch (AbstractMethodError err) {
+            LOGGER.warn("The DocumentBuilderFactory is out of date and does not support setFeature:
" + factory);
         }
         try {
             factory.setFeature(XINCLUDE_FIXUP_LANGUAGE, true);
         } catch (ParserConfigurationException e) {
             LOGGER.warn("The DocumentBuilderFactory [" + factory + "] does not support the
feature ["
                     + XINCLUDE_FIXUP_LANGUAGE + "]", e);
+        } catch (AbstractMethodError err) {
+            LOGGER.warn("The DocumentBuilderFactory is out of date and does not support setFeature:
" + factory);
         }
     }
 



Mime
View raw message