Browse Source

use hashtable instead of getProperty which may return non-null even if the key is not in the hashtable. PR 36151

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@279876 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
ba073f34d4
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      src/main/org/apache/tools/ant/types/PropertySet.java

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

@@ -338,13 +338,11 @@ public class PropertySet extends DataType implements ResourceCollection {
* avoid needless duplication of the Hashtable during recursion.
*/
private void addPropertyNames(Set names, Hashtable properties) {
Project prj = getProject();

// Add this PropertySet's property names.
for (Enumeration e = ptyRefs.elements(); e.hasMoreElements();) {
PropertyRef r = (PropertyRef) e.nextElement();
if (r.name != null) {
if (prj != null && prj.getProperty(r.name) != null) {
if (properties.get(r.name) != null) {
names.add(r.name);
}
} else if (r.prefix != null) {


Loading…
Cancel
Save