You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Nico Seessle <ni...@seessle.de> on 2000/09/23 14:18:45 UTC

[PATCH] Exit.java - Added if and unless attributes

'if' and 'unless' are now supported by the fail-task. This allows for
example to check for required properties without the need to specify a
separate target for every property which you want to check for. The
behaviour is slightly different from target, since empty properties (equal
to "") are handled as if they don't exist.

Nico


Re: [PATCH] Exit.java - Added if and unless attributes

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "CM" == Conor MacNeill <co...@m64.com> writes:

 CM> Nico,

 >> The behaviour is slightly different from target, since
 >> empty properties (equal to "") are handled as if they don't exist.

 CM> I would prefer this behaviour not to be different as it may cause
 CM> "surprises".

Yes, all if/unless attributes should behave the same (target is not
alone with its interpretation, take a look at PatternSet.NameEntry or
JUnitTest).

What kind of use case would be satisfied by treating empty properties
similar to those that don't exist? I think the current concept is
quite clear.

Stefan

RE: [PATCH] Exit.java - Added if and unless attributes

Posted by Conor MacNeill <co...@m64.com>.
Nico,

>
> 'if' and 'unless' are now supported by the fail-task. This allows for
> example to check for required properties without the need to specify a
> separate target for every property which you want to check for. The
> behaviour is slightly different from target, since empty properties (equal
> to "") are handled as if they don't exist.

I would prefer this behaviour not to be different as it may cause
"surprises".

Thoughts?
Conor