ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r668698 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java src/main/org/apache/tools/ant/types/optional/ScriptCondition.java src/tests/antunit/types/scriptcondition-test.xml
Date Tue, 17 Jun 2008 14:57:58 GMT
Author: mbenson
Date: Tue Jun 17 07:57:58 2008
New Revision: 668698

URL: http://svn.apache.org/viewvc?rev=668698&view=rev
Log:
revert broken stuff

Removed:
    ant/core/trunk/src/tests/antunit/types/scriptcondition-test.xml
Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=668698&r1=668697&r2=668698&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Tue Jun 17 07:57:58 2008
@@ -98,8 +98,6 @@
   been modified to encode outgoing (InputStream) content as well as encoding
   incoming (OutputStream) content.
 
-* <scriptcondition> now prefers evaluation result/return value over value property.
-
 * <java> with fork now returns gives -1 instead of 0 as result when failonerror
   is false and some exception (including timeout) occurs. Br 42377. 
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java?rev=668698&r1=668697&r2=668698&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
Tue Jun 17 07:57:58 2008
@@ -17,8 +17,6 @@
  */
 package org.apache.tools.ant.types.optional;
 
-import java.io.File;
-
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.types.Path;
@@ -26,6 +24,9 @@
 import org.apache.tools.ant.util.ScriptRunnerBase;
 import org.apache.tools.ant.util.ScriptRunnerHelper;
 
+
+import java.io.File;
+
 /**
  * This is a {@link ProjectComponent} that has script support built in
  * Use it as a foundation for scriptable things.
@@ -140,13 +141,4 @@
     protected void executeScript(String execName) {
         getRunner().executeScript(execName);
     }
-
-    /**
-     * Evaluate a script.
-     * @param execName name of the script.
-     * @return the result of the evaluation.
-     */
-    protected Object evaluateScript(String execName) {
-        return getRunner().evaluateScript(execName);
-    }
 }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java?rev=668698&r1=668697&r2=668698&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/optional/ScriptCondition.java Tue Jun
17 07:57:58 2008
@@ -43,8 +43,8 @@
      */
     public boolean eval() throws BuildException {
         initScriptRunner();
-        Object result = evaluateScript("ant_condition");
-        return result instanceof Boolean ? ((Boolean) result).booleanValue() : getValue();
+        Object result = executeScript("ant_condition");
+        return getValue();
     }
 
     /**



Mime
View raw message