Repository: logging-log4j2
Updated Branches:
  refs/heads/release-2.x 5d01d299d -> ec10b16ec


[LOG4J2-2283] ParserConfigurationException when using Log4j with
oracle.xml.jaxp.JXDocumentBuilderFactory.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ec10b16e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ec10b16e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ec10b16e

Branch: refs/heads/release-2.x
Commit: ec10b16ecada9168f2a47f28268df77c413ce603
Parents: 5d01d29
Author: Gary Gregory <[email protected]>
Authored: Tue Mar 20 16:45:34 2018 -0600
Committer: Gary Gregory <[email protected]>
Committed: Tue Mar 20 16:45:34 2018 -0600

----------------------------------------------------------------------
 .../logging/log4j/core/config/xml/XmlConfiguration.java       | 7 ++-----
 src/changes/changes.xml                                       | 3 +++
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ec10b16e/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
index 7efb6ab..07d5740 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
@@ -199,7 +199,7 @@ public class XmlConfiguration extends AbstractConfiguration 
implements Reconfigu
         return factory.newDocumentBuilder();
     }
 
-    private static void disableDtdProcessing(final DocumentBuilderFactory 
factory) throws ParserConfigurationException {
+    private static void disableDtdProcessing(final DocumentBuilderFactory 
factory) {
         factory.setValidating(false);
         factory.setExpandEntityReferences(false);
         setFeature(factory, 
"http://xml.org/sax/features/external-general-entities";, false);
@@ -207,12 +207,9 @@ public class XmlConfiguration extends 
AbstractConfiguration implements Reconfigu
         setFeature(factory, 
"http://apache.org/xml/features/nonvalidating/load-external-dtd";, false);
     }
     
-    private static void setFeature(final DocumentBuilderFactory factory, final 
String featureName, final boolean value)
-            throws ParserConfigurationException {
+    private static void setFeature(final DocumentBuilderFactory factory, final 
String featureName, final boolean value) {
         try {
             factory.setFeature(featureName, value);
-        } catch (ParserConfigurationException e) {
-            throw e;
         } catch (Exception | LinkageError e) {
             getStatusLogger().error("Caught {} setting feature {} to {} on 
DocumentBuilderFactory {}: {}",
                     e.getClass().getCanonicalName(), featureName, value, 
factory, e, e);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ec10b16e/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 38a071b..9ded6f8 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -34,6 +34,9 @@
       <action issue="LOG4J2-2268" dev="rgoers" type="fix" due-to="Tilman 
Hausherr">
         Improve plugin error message when elements are missing.
       </action>
+      <action issue="LOG4J2-2283" dev="ggregory" type="fix" due-to="Vishnu 
Priya Matha">
+        ParserConfigurationException when using Log4j with 
oracle.xml.jaxp.JXDocumentBuilderFactory.
+      </action>
     </release>
     <release version="2.11.0" date="2018-03-11" description="GA Release 
2.11.0">
       <action issue="LOG4J2-2104" dev="rgoers" type="fix">

Reply via email to