You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/10/27 22:30:38 UTC
svn commit: r1190002 - in /cxf/branches/2.3.x-fixes: ./
common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Author: dkulp
Date: Thu Oct 27 20:30:37 2011
New Revision: 1190002
URL: http://svn.apache.org/viewvc?rev=1190002&view=rev
Log:
Merged revisions 1189469 via svnmerge from
https://svn.us.apache.org/repos/asf/cxf/branches/2.4.x-fixes
................
r1189469 | dkulp | 2011-10-26 17:18:12 -0400 (Wed, 26 Oct 2011) | 10 lines
Merged revisions 1189467 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1189467 | dkulp | 2011-10-26 17:15:20 -0400 (Wed, 26 Oct 2011) | 2 lines
Trap the calls to factory.setProperty so unsupported properties can be
ignored.
........
................
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1190002&r1=1190001&r2=1190002&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Thu Oct 27 20:30:37 2011
@@ -191,10 +191,10 @@ public final class StaxUtils {
*/
public static XMLInputFactory createXMLInputFactory(boolean nsAware) {
XMLInputFactory factory = XMLInputFactory.newInstance();
- factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, nsAware);
- factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE);
- factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.FALSE);
- factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
+ setProperty(factory, XMLInputFactory.IS_NAMESPACE_AWARE, nsAware);
+ setProperty(factory, XMLInputFactory.SUPPORT_DTD, Boolean.FALSE);
+ setProperty(factory, XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.FALSE);
+ setProperty(factory, XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
factory.setXMLResolver(new XMLResolver() {
public Object resolveEntity(String publicID, String systemID,
String baseURI, String namespace)
@@ -204,6 +204,14 @@ public final class StaxUtils {
});
return factory;
}
+
+ private static void setProperty(XMLInputFactory f, String p, Object o) {
+ try {
+ f.setProperty(p, o);
+ } catch (Throwable t) {
+ //ignore
+ }
+ }