Browse Source

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
master
Costin Manolache 22 years ago
parent
commit
4d141cebd3
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/main/org/apache/tools/ant/PropertyHelper.java

+ 3
- 1
src/main/org/apache/tools/ant/PropertyHelper.java View File

@@ -369,7 +369,9 @@ public class PropertyHelper {


project.log("Setting project property: " + name + " -> " + project.log("Setting project property: " + name + " -> " +
value, Project.MSG_DEBUG); value, Project.MSG_DEBUG);
properties.put(name, value);
if( name!= null && value!=null ) {
properties.put(name, value);
}
} }


/** /**


Loading…
Cancel
Save