Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 10096 invoked from network); 30 Oct 2006 22:30:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2006 22:30:05 -0000 Received: (qmail 62818 invoked by uid 500); 30 Oct 2006 22:30:15 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 62781 invoked by uid 500); 30 Oct 2006 22:30:15 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 62770 invoked by uid 500); 30 Oct 2006 22:30:15 -0000 Received: (qmail 62767 invoked by uid 99); 30 Oct 2006 22:30:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Oct 2006 14:30:15 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Oct 2006 14:29:59 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 69F641A984D; Mon, 30 Oct 2006 14:29:36 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r469303 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Date: Mon, 30 Oct 2006 22:29:36 -0000 To: ant-cvs@apache.org From: peterreilly@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061030222936.69F641A984D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: peterreilly Date: Mon Oct 30 14:29:35 2006 New Revision: 469303 URL: http://svn.apache.org/viewvc?view=rev&rev=469303 Log: Bugzilla 36733, NPE when failure in creating parser Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=469303&r1=469302&r2=469303 ============================================================================== --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Mon Oct 30 14:29:35 2006 @@ -18,6 +18,9 @@ * fails with NPE when compiling with eclipse ecj 3.1.x. Bugzilla 40839. + +* JUnitTestRunner had a NPE when unable to create parser, the exception + containing the error did not get reported. Bugzilla 36733. Other changes: -------------- Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java?view=diff&rev=469303&r1=469302&r2=469303 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Mon Oct 30 14:29:35 2006 @@ -288,6 +288,7 @@ Test suite = null; Throwable exception = null; + boolean startTestSuiteSuccess = false; try { @@ -368,6 +369,7 @@ long start = System.currentTimeMillis(); fireStartTestSuite(); + startTestSuiteSuccess = true; if (exception != null) { // had an exception constructing suite for (int i = 0; i < formatters.size(); i++) { ((TestListener) formatters.elementAt(i)) @@ -405,8 +407,10 @@ systemError = null; systemOut.close(); systemOut = null; - sendOutAndErr(new String(outStrm.toByteArray()), - new String(errStrm.toByteArray())); + if (startTestSuiteSuccess) { + sendOutAndErr(new String(outStrm.toByteArray()), + new String(errStrm.toByteArray())); + } } fireEndTestSuite(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org