Skip to content

Commit

Permalink
Ensure correct XmlEventFactory is used (#2065)
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsm5 authored Jul 26, 2021
1 parent c83cb1e commit 3664480
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.apache.xerces.stax.XMLEventFactoryImpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javax.xml.parsers.SAXParserFactory;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.stream.XMLEventFactory;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;

Expand Down Expand Up @@ -39,4 +40,10 @@ public void testXMLOutputFactory() {
Class<?> outputFactory = com.sun.xml.stream.ZephyrWriterFactory.class;
assertEquals(outputFactory, XMLOutputFactory.newInstance().getClass());
}

@Test //Xerces to ensure that the sax parser is the same as event factory
public void testXMLEventFactory() {
Class<?> outputFactory = org.apache.xerces.stax.XMLEventFactoryImpl.class;
assertEquals(outputFactory, XMLEventFactory.newInstance().getClass());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.apache.xerces.jaxp.SAXParserFactoryImpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.apache.xerces.stax.XMLEventFactoryImpl

0 comments on commit 3664480

Please sign in to comment.