From 4d141cebd39e710404f2f786452120e004ddb05d Mon Sep 17 00:00:00 2001 From: Costin Manolache Date: Tue, 31 Dec 2002 15:49:25 +0000 Subject: [PATCH] Extra check for null. Input is calling setNewProperty - but if defaultValue and value are null we'll get NPE PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273732 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/PropertyHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/PropertyHelper.java b/src/main/org/apache/tools/ant/PropertyHelper.java index 6026b32b8..c5feac93b 100644 --- a/src/main/org/apache/tools/ant/PropertyHelper.java +++ b/src/main/org/apache/tools/ant/PropertyHelper.java @@ -369,7 +369,9 @@ public class PropertyHelper { project.log("Setting project property: " + name + " -> " + value, Project.MSG_DEBUG); - properties.put(name, value); + if( name!= null && value!=null ) { + properties.put(name, value); + } } /**