Jose Alberto Fernandez wrote:

You could also have an add(Condition) method and
that would allow your "no nesting required" notation without
having to extend ConditionBase.



This depends on getting the built-in conditions implemented as types, which
in turn depends on getting the "role" code in to deal with the "or" and "and"s
conditions/selectors.


Peter

As a matter of fact, now that the introspector is able to deal with
"add" methods. Shouldn't we deprecate ConditionBase and discourage
people
from using inheritance?

It would produce a much clearer system.

Jose Alberto




-----Original Message-----
From: Peter Reilly [mailto:[EMAIL PROTECTED] Sent: 29 April 2004 11:38
To: Ant Developers List
Subject: Re: cvs commit: ant/src/etc/testcases/taskdefs fail.xml



I see a small problem here.
Exit was extending Task, and now is extending ConditionBase. ConditionBase does not extend Task so this breaks backward compatiblity.


It may be better to do this:

<exit>
  <condition>
     <equals arg1="a" arg2="${dir.name}"/>
  </condition>
</exit>

rather that:
<exit>
  <equals arg1="a" arg2="${dir.name}"/>
</exit>

(Dispite the fact that I normally argue against extra nesting).

Peter

[EMAIL PROTECTED] wrote:



  * @since Ant 1.2
  *
  * @ant.task name="fail" category="control"
  */
-public class Exit extends Task {
+public class Exit extends ConditionBase {
     private String message;
     private String ifCondition, unlessCondition;






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to