|
|
@@ -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() |
|
|
|