From 337ae879772b1fb950f851b7bafbc89b6293cc85 Mon Sep 17 00:00:00 2001 From: Diane Holt Date: Wed, 29 May 2002 22:43:01 +0000 Subject: [PATCH] Avoid getting an NPE by making sure the property attr is set. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272810 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/UpToDate.java | 4 ++++ 1 file changed, 4 insertions(+) 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());