From bb1f1c678b69a5a0df6c94889146a0f1b95bfca0 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 26 Feb 2003 10:34:09 +0000 Subject: [PATCH] Avoid NPE if input failed git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274178 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Input.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Input.java b/src/main/org/apache/tools/ant/taskdefs/Input.java index 5ff5d4344..752b3d7cf 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Input.java +++ b/src/main/org/apache/tools/ant/taskdefs/Input.java @@ -133,7 +133,7 @@ public class Input extends Task { } /** - * Actual test method executed by jakarta-ant. + * Actual method executed by jakarta-ant. * @exception BuildException */ public void execute () throws BuildException { @@ -152,7 +152,7 @@ public class Input extends Task { && defaultvalue != null) { value = defaultvalue; } - if (addproperty != null) { + if (addproperty != null && value != null) { getProject().setNewProperty(addproperty, value); } }