ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <>
Subject Re: condition shortcutting
Date Tue, 15 Jan 2002 03:25:09 GMT
From: "Steve Loughran" <>

> no, it is like we dont bother evaluating any conditions if the dest
> is already set, because the immutability rules imply that the condition
> cannot change the value of the property anyway.

I know it has been advised, but property immutability is
not a rule, IIRC.

> So it's about 2 lines of code in, which is why I didnt
> mentioning it. I will post it later, when I have it to hand, but roughly
> goes into execute as
> if(project.getProperty(property)!=null) {
>     //eval the condition
> }

Oh, I get what you are saying now.

> <condition "box.offline">
>  <or>
>   <isset property="box.offline"/>
>   <http url=">
>  </or>
> </condition>

I like this (the existing way) because it lets the user construct
the condition explicitly.  But I do not have a strong opinion
on you doing it the way you propose - I guess you are
suggesting it mainly for performance reasons rather than for
the user to have to type an extra Or condition...


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message