ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core IfTask.java
Date Sun, 03 Mar 2002 06:43:50 GMT
donaldp     02/03/02 22:43:50

  Modified:    proposal/myrmidon/src/java/org/apache/antlib/core
                        IfTask.java
  Log:
  Use simplified AbstractContainerTask
  
  Revision  Changes    Path
  1.5       +3 -13     jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/IfTask.java
  
  Index: IfTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/IfTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IfTask.java	3 Mar 2002 02:19:11 -0000	1.4
  +++ IfTask.java	3 Mar 2002 06:43:50 -0000	1.5
  @@ -16,15 +16,13 @@
   import org.apache.myrmidon.framework.Condition;
   import org.apache.myrmidon.framework.conditions.IsSetCondition;
   import org.apache.myrmidon.framework.conditions.NotCondition;
  -import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
  -import org.apache.myrmidon.interfaces.executor.Executor;
   
   /**
    * A simple task to test a supplied condition. If the condition is true
    * then it will execute the inner tasks, else it won't.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.4 $ $Date: 2002/03/03 02:19:11 $
  + * @version $Revision: 1.5 $ $Date: 2002/03/03 06:43:50 $
    * @ant:task name="if"
    */
   public class IfTask
  @@ -77,7 +75,7 @@
           }
   
           // Evaluate the condition
  -        if( ! m_condition.evaluate( getContext() ) )
  +        if( !m_condition.evaluate( getContext() ) )
           {
               return;
           }
  @@ -85,15 +83,7 @@
           final Configuration[] tasks =
               (Configuration[])m_tasks.toArray( new Configuration[ m_tasks.size() ] );
   
  -        // TODO - don't use getService()
  -        final ExecutionFrame frame = (ExecutionFrame)getService( ExecutionFrame.class );
  -        final Executor executor = (Executor)getService( Executor.class );
  -
  -        for( int i = 0; i < tasks.length; i++ )
  -        {
  -            final Configuration task = tasks[ i ];
  -            executor.execute( task, frame );
  -        }
  +        executeTasks( tasks );
       }
   
       public String toString()
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message