diff options
Diffstat (limited to 'src/main/org/apache/tools/ant/taskdefs/condition/Not.java')
-rw-r--r-- | src/main/org/apache/tools/ant/taskdefs/condition/Not.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/org/apache/tools/ant/taskdefs/condition/Not.java b/src/main/org/apache/tools/ant/taskdefs/condition/Not.java index a39dcbb04..453be71b4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/condition/Not.java +++ b/src/main/org/apache/tools/ant/taskdefs/condition/Not.java @@ -36,15 +36,16 @@ public class Not extends ConditionBase implements Condition { * @return true if the condition is true. * @throws BuildException if the condition is not configured correctly. */ + @Override public boolean eval() throws BuildException { if (countConditions() > 1) { - throw new BuildException("You must not nest more than one " - + "condition into <not>"); + throw new BuildException( + "You must not nest more than one condition into <not>"); } if (countConditions() < 1) { throw new BuildException("You must nest a condition into <not>"); } - return !((Condition) getConditions().nextElement()).eval(); + return !getConditions().nextElement().eval(); } } |