Browse Source

Condition no longer throws a ContextException

Submitted By: "Adam Murdoch" <adammurdoch_ml@yahoo.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270850 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
9fcace6e3a
1 changed files with 11 additions and 19 deletions
  1. +11
    -19
      proposal/myrmidon/src/java/org/apache/antlib/core/Fail.java

+ 11
- 19
proposal/myrmidon/src/java/org/apache/antlib/core/Fail.java View File

@@ -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,31 +52,24 @@ public class Fail
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 );
}
}

private void checkNullMessage()


Loading…
Cancel
Save