Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 99706 invoked from network); 3 Dec 2009 20:10:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Dec 2009 20:10:48 -0000 Received: (qmail 36119 invoked by uid 500); 3 Dec 2009 20:10:48 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 36066 invoked by uid 500); 3 Dec 2009 20:10:47 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 36057 invoked by uid 99); 3 Dec 2009 20:10:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 20:10:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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, 03 Dec 2009 20:10:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C229D238899B; Thu, 3 Dec 2009 20:10:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r886898 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/util/XMLHelper.java Date: Thu, 03 Dec 2009 20:10:23 -0000 To: notifications@ant.apache.org From: maartenc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091203201023.C229D238899B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: maartenc Date: Thu Dec 3 20:10:23 2009 New Revision: 886898 URL: http://svn.apache.org/viewvc?rev=886898&view=rev Log: FIX: Use of a shared DocumentBuilder causes SAXException during parallel resolutions (IVY-1147) Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=886898&r1=886897&r2=886898&view=diff ============================================================================== --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Thu Dec 3 20:10:23 2009 @@ -100,6 +100,7 @@ - IMPROVEMENT: Trace a message when a property file referenced from the settings doesn't exixts (IVY-1074) - IMPROVEMENT: use defaultconf in combination with defaultconfmapping (IVY-1135) (thanks to Jon Schneider) +- FIX: Use of a shared DocumentBuilder causes SAXException during parallel resolutions (IVY-1147) - FIX: metadata lock files not always deleted from cache (IVY-1145) (thanks to Jason Trump) - FIX: FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names (IVY-968) - FIX: ivy:retrieve sync="true" does nothing if first variable is optional (IVY-1142) (thanks to Andreas Axelsson) Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java?rev=886898&r1=886897&r2=886898&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java Thu Dec 3 20:10:23 2009 @@ -51,8 +51,6 @@ static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema"; private static boolean canUseSchemaValidation = true; - - private static DocumentBuilder docBuilder; private static SAXParser newSAXParser(URL schema, InputStream schemaStream) throws ParserConfigurationException, SAXException { @@ -206,19 +204,17 @@ } public static DocumentBuilder getDocBuilder(EntityResolver entityResolver) { - if (docBuilder == null) { - try { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setValidating(false); - docBuilder = factory.newDocumentBuilder(); - if (entityResolver != null) { - docBuilder.setEntityResolver(entityResolver); - } - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - } - return docBuilder; + try { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setValidating(false); + DocumentBuilder docBuilder = factory.newDocumentBuilder(); + if (entityResolver != null) { + docBuilder.setEntityResolver(entityResolver); + } + return docBuilder; + } catch (ParserConfigurationException e) { + throw new RuntimeException(e); + } }