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 Fail.java
Date Fri, 25 Jan 2002 11:26:09 GMT
donaldp     02/01/25 03:26:09

  Modified:    proposal/myrmidon/src/java/org/apache/antlib/core Fail.java
  Log:
  Condition no longer throws a ContextException
  
  Submitted By: "Adam Murdoch" <adammurdoch_ml@yahoo.com>
  
  Revision  Changes    Path
  1.5       +11 -19    jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/Fail.java
  
  Index: Fail.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/core/Fail.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Fail.java	13 Jan 2002 00:02:11 -0000	1.4
  +++ Fail.java	25 Jan 2002 11:26:09 -0000	1.5
  @@ -7,7 +7,6 @@
    */
   package org.apache.antlib.core;
   
  -import org.apache.avalon.framework.context.ContextException;
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Condition;
  @@ -53,30 +52,23 @@
       public void execute()
           throws TaskException
       {
  -        try
  +        boolean failed = true;
  +
  +        if( null != m_condition )
           {
  -            boolean failed = true;
  +            failed = m_condition.evaluate( getContext() );
  +        }
   
  -            if( null != m_condition )
  +        if( failed )
  +        {
  +            if( null != m_message )
               {
  -                failed = m_condition.evaluate( getContext() );
  +                throw new TaskException( m_message );
               }
  -
  -            if( failed )
  +            else
               {
  -                if( null != m_message )
  -                {
  -                    throw new TaskException( m_message );
  -                }
  -                else
  -                {
  -                    throw new TaskException();
  -                }
  +                throw new TaskException();
               }
  -        }
  -        catch( final ContextException ce )
  -        {
  -            throw new TaskException( ce.toString(), ce );
           }
       }
   
  
  
  

--
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