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 Wed, 19 Dec 2001 10:29:09 GMT
donaldp     01/12/19 02:29:09

  Modified:    proposal/myrmidon/src/java/org/apache/antlib/core Fail.java
  Log:
  Fail should not need a condition and will just unconditionally fail if not provided.
  
  Revision  Changes    Path
  1.2       +7 -7      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Fail.java	2001/12/17 10:49:06	1.1
  +++ Fail.java	2001/12/19 10:29:09	1.2
  @@ -32,6 +32,7 @@
   
       public void addContent( final String message )
       {
  +        System.out.println( message );
           checkNullMessage();
           m_message = message;
       }
  @@ -51,15 +52,14 @@
       public void execute()
           throws TaskException
       {
  -        if( null == m_condition )
  -        {
  -            throw new TaskException( "Use did not specify a condition" );
  -        }
  -
           try
           {
  -            final boolean failed =
  -                m_condition.evaluate( getContext() );
  +            boolean failed = true;
  +
  +            if( null != m_condition )
  +            {
  +                failed = m_condition.evaluate( getContext() );
  +            }
   
               if( failed )
               {
  
  
  

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