From dev-return-70949-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Thu Feb 02 20:13:23 2006 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 78712 invoked from network); 2 Feb 2006 20:13:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Feb 2006 20:13:23 -0000 Received: (qmail 36782 invoked by uid 500); 2 Feb 2006 20:13:21 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 36746 invoked by uid 500); 2 Feb 2006 20:13:21 -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 36734 invoked by uid 99); 2 Feb 2006 20:13:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2006 12:13:20 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.201.67] (HELO web30914.mail.mud.yahoo.com) (68.142.201.67) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 02 Feb 2006 12:13:19 -0800 Received: (qmail 18947 invoked by uid 60001); 2 Feb 2006 20:12:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=pk99TdSq06Ch7rzfk1gxseo6gGIe1/sTZp2XKyMRvtCQ9KT8sCGMPe7qEoEYUr/x9LZ561mzUmPo9hCOwxRvZwzPhFR06W6H50asCl1QC4JgP3h/TWZZ0rKejKYp+SiVe7L9/zrQQhfGfzpzpPJRJaiZhomZ7kMWOWI0TM9IEc8= ; Message-ID: <20060202201258.18945.qmail@web30914.mail.mud.yahoo.com> Received: from [66.10.233.130] by web30914.mail.mud.yahoo.com via HTTP; Thu, 02 Feb 2006 12:12:58 PST Date: Thu, 2 Feb 2006 12:12:58 -0800 (PST) From: Matt Benson Subject: Re: svn commit: r374482 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/ProjectComponent.java src/main/org/apache/tools/ant/Task.java To: Ant Developers List In-Reply-To: <20060202200840.75357.qmail@minotaur.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Martijn, I think you've got to stay more w/ the patch submitted, since Task calls not Project.log(String, int), but Project(Task, String, int) --passing itself in as the originator of the message... -Matt --- jkf@apache.org wrote: > Author: jkf > Date: Thu Feb 2 12:08:32 2006 > New Revision: 374482 > > URL: > http://svn.apache.org/viewcvs?rev=374482&view=rev > Log: > 38458 removed log implementation of Task to allow > logging from tasks outside a project. The base class > has the logging behaviour we need. This does not > guarantee that (all) tasks are working outside an > project, but at least will not break just because of > logging. > > Modified: > ant/core/trunk/WHATSNEW > > ant/core/trunk/src/main/org/apache/tools/ant/ProjectComponent.java > > ant/core/trunk/src/main/org/apache/tools/ant/Task.java > > Modified: ant/core/trunk/WHATSNEW > URL: > http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=374482&r1=374481&r2=374482&view=diff > ============================================================================== > --- ant/core/trunk/WHATSNEW (original) > +++ ant/core/trunk/WHATSNEW Thu Feb 2 12:08:32 2006 > @@ -4,6 +4,9 @@ > Changes that could break older environments: > -------------------------------------------- > > +* Task will now log correctly even if no project is > set. > + Bugzilla report 38458. > + > * Use alternative names for the command line > arguments in javac. Bugzilla > Report 37546. > > > Modified: > ant/core/trunk/src/main/org/apache/tools/ant/ProjectComponent.java > URL: > http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/ProjectComponent.java?rev=374482&r1=374481&r2=374482&view=diff > ============================================================================== > --- > ant/core/trunk/src/main/org/apache/tools/ant/ProjectComponent.java > (original) > +++ > ant/core/trunk/src/main/org/apache/tools/ant/ProjectComponent.java > Thu Feb 2 12:08:32 2006 > @@ -1,5 +1,5 @@ > /* > - * Copyright 2001-2004 The Apache Software > Foundation > + * Copyright 2001-2004,2006 The Apache Software > Foundation > * > * Licensed under the Apache License, Version 2.0 > (the "License"); > * you may not use this file except in compliance > with the License. > @@ -75,8 +75,8 @@ > * to be logged. > */ > public void log(String msg, int msgLevel) { > - if (project != null) { > - project.log(msg, msgLevel); > + if (getProject() != null) { > + getProject().log(msg, msgLevel); > } else { > // 'reasonable' default, if the > component is used without > // a Project ( for example as a > standalone Bean ). > > Modified: > ant/core/trunk/src/main/org/apache/tools/ant/Task.java > URL: > http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/Task.java?rev=374482&r1=374481&r2=374482&view=diff > ============================================================================== > --- > ant/core/trunk/src/main/org/apache/tools/ant/Task.java > (original) > +++ > ant/core/trunk/src/main/org/apache/tools/ant/Task.java > Thu Feb 2 12:08:32 2006 > @@ -1,5 +1,5 @@ > /* > - * Copyright 2000-2005 The Apache Software > Foundation > + * Copyright 2000-2006 The Apache Software > Foundation > * > * Licensed under the Apache License, Version 2.0 > (the "License"); > * you may not use this file except in compliance > with the License. > @@ -333,18 +333,6 @@ > */ > public void log(String msg) { > log(msg, Project.MSG_INFO); > - } > - > - /** > - * Logs a message with the given priority. This > delegates > - * the actual logging to the project. > - * > - * @param msg The message to be logged. Should > not be null. > - * @param msgLevel The message priority at > which this message is to > - * be logged. > - */ > - public void log(String msg, int msgLevel) { > - getProject().log(this, msg, msgLevel); > } > > /** > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > dev-unsubscribe@ant.apache.org > For additional commands, e-mail: > dev-help@ant.apache.org > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org