Browse Source

Fail should not need a condition and will just unconditionally fail if not provided.

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

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

@@ -32,6 +32,7 @@ public class Fail


public void addContent( final String message ) public void addContent( final String message )
{ {
System.out.println( message );
checkNullMessage(); checkNullMessage();
m_message = message; m_message = message;
} }
@@ -51,15 +52,14 @@ public class Fail
public void execute() public void execute()
throws TaskException throws TaskException
{ {
if( null == m_condition )
{
throw new TaskException( "Use did not specify a condition" );
}

try try
{ {
final boolean failed =
m_condition.evaluate( getContext() );
boolean failed = true;

if( null != m_condition )
{
failed = m_condition.evaluate( getContext() );
}


if( failed ) if( failed )
{ {


Loading…
Cancel
Save