diff --git a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java index 59dd30c34..0afd81860 100644 --- a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java +++ b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java @@ -223,6 +223,10 @@ public class UpToDate extends Task implements Condition { * than (each of) the corresponding source file(s). */ public void execute() throws BuildException { + if (_property == null) { + throw new BuildException("property attribute is required.", + location); + } boolean upToDate = eval(); if (upToDate) { this.project.setNewProperty(_property, getValue());