Author: mbenson Date: Mon Oct 29 08:55:40 2007 New Revision: 589701 URL: http://svn.apache.org/viewvc?rev=589701&view=rev Log: revert scriptcondition changes, at least for 1.7.1
Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/scriptcondition-test.xml Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java?rev=589701&r1=589700&r2=589701&view=diff ============================================================================== --- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java (original) +++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java Mon Oct 29 08:55:40 2007 @@ -43,8 +43,8 @@ */ public boolean eval() throws BuildException { initScriptRunner(); - Object result = evaluateScript("ant_condition"); - return result instanceof Boolean ? ((Boolean) result).booleanValue() : getValue(); + evaluateScript("ant_condition"); + return getValue(); } /** Modified: ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/scriptcondition-test.xml URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/scriptcondition-test.xml?rev=589701&r1=589700&r2=589701&view=diff ============================================================================== --- ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/scriptcondition-test.xml (original) +++ ant/core/branches/ANT_17_BRANCH/src/tests/antunit/types/scriptcondition-test.xml Mon Oct 29 08:55:40 2007 @@ -79,86 +79,4 @@ </f> </target> - <target name="testBeanshellReturnTrue" if="beanshell.avail"> - <t message="testBeanshellReturnTrue"> - <scriptcondition language="beanshell" value="false"> - return true; - </scriptcondition> - </t> - </target> - - <target name="testBeanshellReturnFalse" if="beanshell.avail"> - <f message="testBeanshellReturnFalse"> - <scriptcondition language="beanshell" value="true"> - return false; - </scriptcondition> - </f> - </target> - - <target name="testBeanshellReturnOverridesValue" if="beanshell.avail"> - <f message="testBeanshellReturnOverridesValue"> - <scriptcondition language="beanshell" value="false"> - self.setValue(true); - return false; - </scriptcondition> - </f> - </target> - - <target name="testBeanshellReturnNullIgnored" if="beanshell.avail"> - <t message="testBeanshellReturnNullIgnored"> - <scriptcondition language="beanshell" value="true"> - return null; - </scriptcondition> - </t> - </target> - - <target name="testBeanshellReturnNonBooleanIgnored" if="beanshell.avail"> - <t message="testBeanshellReturnNonBooleanIgnored"> - <scriptcondition language="beanshell" value="true"> - return 20; - </scriptcondition> - </t> - </target> - - <target name="testJsReturnTrue" if="js.avail"> - <t message="testJsReturnTrue"> - <scriptcondition language="javascript" value="false"> - java.lang.Boolean.TRUE - </scriptcondition> - </t> - </target> - - <target name="testJsReturnFalse" if="js.avail"> - <f message="testJsReturnFalse"> - <scriptcondition language="javascript" value="true"> - java.lang.Boolean.FALSE - </scriptcondition> - </f> - </target> - - <target name="testJsReturnOverridesValue" if="js.avail"> - <f message="testJsReturnOverridesValue"> - <scriptcondition language="javascript" value="false"> - self.setValue(true); - false - </scriptcondition> - </f> - </target> - - <target name="testJsReturnNullIgnored" if="js.avail"> - <t message="testJsReturnNullIgnored"> - <scriptcondition language="javascript" value="true"> - null - </scriptcondition> - </t> - </target> - - <target name="testJsReturnNonBooleanIgnored" if="js.avail"> - <t message="testJsReturnNonBooleanIgnored"> - <scriptcondition language="javascript" value="true"> - new java.lang.Integer(20) - </scriptcondition> - </t> - </target> - </project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]