Author: dkulp Date: Mon Mar 25 18:31:28 2013 New Revision: 1460817 URL: http://svn.apache.org/r1460817 Log: Merged revisions 1460789 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
........ r1460789 | dkulp | 2013-03-25 13:56:30 -0400 (Mon, 25 Mar 2013) | 10 lines Merged revisions 1460772 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1460772 | dkulp | 2013-03-25 13:34:28 -0400 (Mon, 25 Mar 2013) | 2 lines If cannot create a parser factory at startup, allow trying at runtime. ........ ........ Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1460817&r1=1460816&r2=1460817&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original) +++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Mon Mar 25 18:31:28 2013 @@ -162,14 +162,19 @@ public final class StaxUtils { allowInsecureParser = "1".equals(s) || Boolean.parseBoolean(s); } - XMLInputFactory xif = createXMLInputFactory(true); - String xifClassName = xif.getClass().getName(); - if (xifClassName.contains("ctc.wstx") || xifClassName.contains("xml.xlxp") - || xifClassName.contains("xml.xlxp2") || xifClassName.contains("bea.core")) { - SAFE_INPUT_FACTORY = xif; - } else { - SAFE_INPUT_FACTORY = null; + XMLInputFactory xif = null; + try { + xif = createXMLInputFactory(true); + String xifClassName = xif.getClass().getName(); + if (!xifClassName.contains("ctc.wstx") && !xifClassName.contains("xml.xlxp") + && !xifClassName.contains("xml.xlxp2") && !xifClassName.contains("bea.core")) { + xif = null; + } + } catch (Throwable t) { + //ignore, can always drop down to the pooled factories + xif = null; } + SAFE_INPUT_FACTORY = xif; XMLOutputFactory xof = XMLOutputFactory.newInstance(); String xofClassName = xof.getClass().getName();
