diff --git a/src/main/org/apache/tools/ant/types/PropertySet.java b/src/main/org/apache/tools/ant/types/PropertySet.java index 1af009983..36e8c1971 100644 --- a/src/main/org/apache/tools/ant/types/PropertySet.java +++ b/src/main/org/apache/tools/ant/types/PropertySet.java @@ -320,6 +320,9 @@ public class PropertySet extends DataType implements ResourceCollection { for (Iterator iter = names.iterator(); iter.hasNext();) { String name = (String) iter.next(); String value = (String) props.get(name); + if (value != null) { + // may be null if a system property has been added + // after the project instance has been initialized if (m != null) { //map the names String[] newname = m.mapFileName(name); @@ -328,6 +331,7 @@ public class PropertySet extends DataType implements ResourceCollection { } } properties.setProperty(name, value); + } } return properties; }