Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 19297 invoked from network); 28 Nov 2002 13:16:48 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 28 Nov 2002 13:16:48 -0000 Received: (qmail 21368 invoked by uid 97); 28 Nov 2002 13:17:32 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 21281 invoked by uid 97); 28 Nov 2002 13:17:31 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 21193 invoked by uid 98); 28 Nov 2002 13:17:30 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <011301c296e0$581cfa50$9865fea9@spiritsoft.com> From: "James Strachan" To: "Jakarta Commons Developers List" References: <36E996B162DAD111B6AF0000F879AD1A76C046@nts_par1.paranor.ch> Subject: Re: [PATCH] [jelly] new tag Date: Thu, 28 Nov 2002 13:16:19 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N From: "Wannheden, Knut" > Hi, > > Here is an addition to the Jelly tag library junit. It includes the tag > which is used to assert that an exception is thrown by > its body. The patch consists of the two attachments patch-java.txt and > patch-test.txt. The first includes the class implementing the new tag and > the changes to the tag library class, whereas the second includes additions > to the junit tag library test suite to test the new tag. For documentation > refer to the Javadoc and the examples in the test suite. Great stuff Knut. I've just committed your patch to CVS. I made 2 minor tweaks before committing it. * rather than expectedThrowable="..." I renamed the attribute to expected="...". I though this would save typing and make the tag more polymorphic with the assertEquals and assertDocumentEquals tags. (If there is such a thing as polymorphic tags ;-) * if an exception class couldn't be found, rather than eating up the exception I've left it to bubble up; then ClassPath errors can be found more easily. * I made a minor patch to avoid the use of Class.forName(), which is considered evil... http://radio.weblogs.com/0112098/2002/09/24.html#a114 and instead use both a customizable ClassLoader as well as defaulting to either the class loader that loaded the tag library or the current threads context class loader. Going forward it'd be nice to generalize all use of ClassLoaders in Jelly scripts by using a nested tag, along similar lines to Rod's recent patch. There's a few tags that are ClassLoader-aware so it should be possible to do I think. I've created a new task so we don't forget to do this... http://jira.werken.com/secure/ViewIssue.jspa?key=JELLY-17 Thanks again for another good patch. James ------- http://radio.weblogs.com/0112098/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: For additional commands, e-mail: