Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 64672 invoked from network); 24 Jul 2007 18:08:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jul 2007 18:08:27 -0000 Received: (qmail 52654 invoked by uid 500); 24 Jul 2007 18:08:27 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 52613 invoked by uid 500); 24 Jul 2007 18:08:27 -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 52592 invoked by uid 99); 24 Jul 2007 18:08:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2007 11:08:27 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [206.190.58.152] (HELO web55103.mail.re4.yahoo.com) (206.190.58.152) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 24 Jul 2007 11:08:23 -0700 Received: (qmail 62621 invoked by uid 60001); 24 Jul 2007 18:08:02 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=B5JbMYDoJkBKmfhpPVHZJJ/1cNaKGabRY06JL6educ9UZGSNwkRrDRrw6fr+lE61eEm0FohRdpGOEpMW4lABGdByHlKnD6pVoImrIIkCKGBSEi5vvdf4Y4CO9Mlcuz33K9h/DnASGgKTuvtG6JtIPlNpjBJqHw3mYeye2MlCm5w=; X-YMail-OSG: tHQSoUMVM1mikl7aFDlNPf0QyH_BvyKQvsq3ownLDSAXCAE6T7JHow1NsheBvXq_CVPxZDIt6VIcTqIk_GG_Cfrwols5Dvz4x.IiN6kfAg629JTMuXWPGeXztq54ig-- Received: from [66.10.233.130] by web55103.mail.re4.yahoo.com via HTTP; Tue, 24 Jul 2007 11:08:02 PDT Date: Tue, 24 Jul 2007 11:08:02 -0700 (PDT) From: Matt Benson Subject: Re: svn commit: r559096 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/Path.java To: Ant Developers List In-Reply-To: <255d8d690707240945p797f4b14ja2cbc9e036dbbc08@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <578959.62365.qm@web55103.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --- Dominique Devienne wrote: > Matt, did you test this? You write that derive > classes can override > delegateIteratorToList() to return false, but this > is used to init a > class member of Path, i.e. the *super* class of the > one supposed to do > the overriding... > > Assuming a MyPath extends Path, Path's members and > Ctors are called > before MyPath is initialized, so relying on virtual > dispatch on a > class that's not been initialized yet is fraught > with trouble. Perhaps > it works OK if MyPath.delegateIteratorToList() just > returns false, but > why not simply forgo the caching into preserveBC and > systematically > call delegateIteratorToList() when needed, at a time > MyPath is fully > initialized? > Certainly this could be done, but I was looking to avoid the expense of multiple reflection-based checks. Do you think it would be better to store a Boolean so that the call could still be made only once (triggered by the null reference), but deferred until after initialization? -Matt > --DD > > On 7/24/07, mbenson@apache.org > wrote: > > + private final boolean preserveBC = > delegateIteratorToList(); > > > + /** > > + * that implements list(); this > can, of course, be avoided by overriding > > + * this method to return false. > It is not expected that the result of this > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > dev-unsubscribe@ant.apache.org > For additional commands, e-mail: > dev-help@ant.apache.org > > ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org