Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 49341 invoked from network); 24 Jun 2004 22:16:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Jun 2004 22:16:13 -0000 Received: (qmail 47006 invoked by uid 500); 24 Jun 2004 22:16:06 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 46896 invoked by uid 500); 24 Jun 2004 22:16:05 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 46796 invoked by uid 99); 24 Jun 2004 22:16:04 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received: from [205.158.62.78] (HELO smtp1.us4.outblaze.com) (205.158.62.78) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 24 Jun 2004 15:16:02 -0700 Received: (qmail 22884 invoked from network); 24 Jun 2004 22:15:29 -0000 Received: from unknown (HELO puck.earthling.net) (wascallywabbit:earthling.net?mail.com@24.44.179.36) by smtp1.us4.outblaze.com with SMTP; 24 Jun 2004 22:15:29 -0000 Message-Id: <6.1.1.1.2.20040624181124.0288f1a8@pop1.mail.com> X-Sender: wascallywabbit:earthling.net#mail.com@pop1.mail.com X-Mailer: QUALCOMM Windows Eudora Version 6.1.1.1 Date: Thu, 24 Jun 2004 18:16:13 -0400 To: "Ant Users List" From: Wascally Wabbit Subject: Re: recursive expansion of property names In-Reply-To: <40DB50D5.50206@magmic.com> References: <20040623222044.93834.qmail@web20423.mail.yahoo.com> <40DB159A.3E9088F3@purematrix.com> <40DB2C9C.80206@magmic.com> <6.1.1.1.2.20040624172105.02845e28@pop1.mail.com> <40DB50D5.50206@magmic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N At 06:08 PM 6/24/2004, you wrote: >so what do I do with this? > > private Object getProperty0(String ns, String name) > { > if (name==null) { > return null; > } > Object o = m_allProperties.get(name); /// <---- MINE > if (o==null) { > o = m_defImpl.getProperty(ns,name); /// <--- THE THING I > REPLACED > } > return o; > } > > >do I switch it to just: > > private Object getProperty0(String ns, String name) { > if (name == null) { return null; } > return o = m_defImpl.getProperty(ns,name); > } > >in which case I may as well just inline it. Correct. Drop the '0' fluff (I just cut-n-pasted my code w/o editing). Just inline the calls in your case. I got your original code working with just simple lines like: public Object getProperty(String ns, String name) { return defImpl.getProperty(ns,name); } public Object getUserProperty(String ns, String name) { return defImpl.getUserProperty(ns,name); } ... Tedious but it seems to work (your uninstall will also work since any modifications will be applied against the original now-restored helper). >-- >Jeffrey Bacon >jbacon@magmic.com >Creative Developer >http://www.magmic.com > >Wascally Wabbit wrote: >>Whoops...in my previous reply I should've mentioned >>that your helper does not need to keep any maps because you're >>only replacing the 'replaceProperties' algorithm. Just >>delegate to the replaced helper instead of using inheritance. >>At 03:33 PM 6/24/2004, you wrote: >> >will that patch work on Ant's 1.6.1 source code it is it specific to >> >1.7? I tried implementing Wascally Wabbit's suggestion from the other day >> >and just took the replacePropertiesRecursively from the patch you >> >submitted. I don't really *understand* how the property helper chaining >> >stuff works but I THINK that either I'm not getting put in the chain or >> >the replacePropertiesRecursively method is not working on regular >> >properties. ${basedir} does not even get resolved -- though I suspect >> >that something I'm doing is wrong as that should get resolved BEFORE my >> >PropertyHandler is even installed. >>[snip...] >>The Wabbit The Wabbit --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org