Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 867F893CB for ; Thu, 27 Oct 2011 20:30:59 +0000 (UTC) Received: (qmail 10424 invoked by uid 500); 27 Oct 2011 20:30:59 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 10370 invoked by uid 500); 27 Oct 2011 20:30:59 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 10363 invoked by uid 99); 27 Oct 2011 20:30:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 20:30:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 20:30:58 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 37508238897A for ; Thu, 27 Oct 2011 20:30:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1190002 - in /cxf/branches/2.3.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Date: Thu, 27 Oct 2011 20:30:38 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111027203038.37508238897A@eris.apache.org> 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 + } + }