From: <st...@us...> - 2008-01-25 15:33:57
|
Revision: 5800 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=5800&view=rev Author: steve_l Date: 2008-01-25 07:33:54 -0800 (Fri, 25 Jan 2008) Log Message: ----------- reverting an 'enhancement' that broke things Modified Paths: -------------- trunk/core/extras/ant/src/org/smartfrog/tools/ant/ConditionalSequence.java Modified: trunk/core/extras/ant/src/org/smartfrog/tools/ant/ConditionalSequence.java =================================================================== --- trunk/core/extras/ant/src/org/smartfrog/tools/ant/ConditionalSequence.java 2008-01-24 16:49:41 UTC (rev 5799) +++ trunk/core/extras/ant/src/org/smartfrog/tools/ant/ConditionalSequence.java 2008-01-25 15:33:54 UTC (rev 5800) @@ -38,9 +38,6 @@ public class ConditionalSequence extends Sequential { private String ifAttr="",unlessAttr=""; - private Boolean ifTrue; - //false is anything but true - private Boolean ifFalse; public void setIf(String arg) { ifAttr = arg; @@ -50,29 +47,14 @@ unlessAttr = arg; } - public void setIfTrue(Boolean ifTrue) { - this.ifTrue = ifTrue; - } - - public void setIfFalse(Boolean ifFalse) { - this.ifFalse = ifFalse; - } - /** * Execute all nestedTasks if the conditions permit it * * @throws BuildException if one of the nested tasks fails. */ public void execute() throws BuildException { - - //true if unset. if set, must eval to true - boolean ifTrueTrue = ifTrue == null || ifTrue.booleanValue(); - //true if unset or evals to true - boolean ifAttrSet = ifAttr.length() == 0 || getProject().getProperty(ifAttr) != null; - //false unless actually defined - boolean unlessAttrSet = unlessAttr.length() > 0 && getProject().getProperty(unlessAttr) != null; - boolean ifFalseFalse = ifFalse != null && !ifFalse.booleanValue(); - if (ifAttrSet && ifTrueTrue && ifFalseFalse && !unlessAttrSet) { + if ((ifAttr.length() == 0 || getProject().getProperty(ifAttr) != null) && + (unlessAttr.length() == 0 || getProject().getProperty(unlessAttr) == null)) { super.execute(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |