Skip to content

Commit

Permalink
Merge 0af1041 into 0d06627
Browse files Browse the repository at this point in the history
  • Loading branch information
jodue committed Feb 27, 2017
2 parents 0d06627 + 0af1041 commit a1685c9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion hapi-fhir-base/src/main/java/ca/uhn/fhir/util/XmlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,20 @@ private static XMLInputFactory getOrCreateInputFactory() throws FactoryConfigura
*/
try {
Class.forName("com.ctc.wstx.stax.WstxInputFactory");
if (inputFactory instanceof com.ctc.wstx.stax.WstxInputFactory) {
boolean isWoodstox = inputFactory instanceof com.ctc.wstx.stax.WstxInputFactory;
if ( !isWoodstox )
{
// Check if implementation is woodstox by property since instanceof check does not work if running in JBoss
try
{
isWoodstox = inputFactory.getProperty( "org.codehaus.stax2.implVersion" ) != null;
}
catch ( Exception e )
{
// ignore
}
}
if (isWoodstox) {
// inputFactory.setProperty(WstxInputFactory.IS_REPLACING_ENTITY_REFERENCES, false);
inputFactory.setProperty(WstxInputProperties.P_UNDECLARED_ENTITY_RESOLVER, XML_RESOLVER);
try {
Expand Down

0 comments on commit a1685c9

Please sign in to comment.