I had looked into something like this, but what about the case when a delegate needs to re-call PH? The delegate in question would need the NullReturn object (should we refactor this to be just a PSF Object on PropertyHelper?). Maybe we can have a PropertyHelper store a proxy to itself, that does not decode NullReturn, and it is _this_ proxy that is passed to the delegates instead of the _real_ PH. WDYT?
-Matt --- [EMAIL PROTECTED] wrote: > Author: peterreilly > Date: Wed Aug 22 01:42:11 2007 > New Revision: 568511 > > URL: > http://svn.apache.org/viewvc?rev=568511&view=rev > Log: > allow a propertyevalulator to signal that it 'owns' > the property, but the property is not set > > Modified: > > ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java > > Modified: > ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java > URL: > http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java?rev=568511&r1=568510&r2=568511&view=diff > ============================================================================== > --- > ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java > (original) > +++ > ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java > Wed Aug 22 01:42:11 2007 > @@ -28,6 +28,8 @@ > import java.util.Vector; > import java.util.Enumeration; > > +import org.apache.tools.ant.property.NullReturn; > + > /* ISSUES: > - ns param. It could be used to provide > "namespaces" for properties, which > may be more flexible. > @@ -784,6 +786,9 @@ > for (Iterator iter = > getDelegates(PropertyEvaluator.class).iterator(); > iter.hasNext();) { > Object o = ((PropertyEvaluator) > iter.next()).evaluate(name, this); > if (o != null) { > + if (o instanceof NullReturn) { > + return null; > + } > return o; > } > } > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ____________________________________________________________________________________ Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]