From 2972b55fb5459ea7d0bc23d102564dc6205551f9 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 12 Jan 2022 19:00:29 +0100 Subject: [PATCH] make PropertyHelper a bit more backwards compatible Bugzilla Report 65799 --- WHATSNEW | 8 ++++++++ src/main/org/apache/tools/ant/PropertyHelper.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WHATSNEW b/WHATSNEW index ff6e43af7..7d5f2c44e 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -10,6 +10,14 @@ Changes that could break older environments: credentials being used on the redirected URI may break. Github Pull Request #173 +Fixed bugs: +----------- + +* the ProperyEnumerator change introduced in 1.10.9 proved to be not + fully backwards compatible when combined with certain custom + PropertyHelper implementations - for example when using AntXtras. + Bugzilla Report 65799 + Other changes: -------------- diff --git a/src/main/org/apache/tools/ant/PropertyHelper.java b/src/main/org/apache/tools/ant/PropertyHelper.java index 53ec6ee7a..99d1a29ae 100644 --- a/src/main/org/apache/tools/ant/PropertyHelper.java +++ b/src/main/org/apache/tools/ant/PropertyHelper.java @@ -860,7 +860,7 @@ public class PropertyHelper implements GetProperty { * @return the names of all known properties. */ public Set getPropertyNames() { - final Set names = new HashSet<>(properties.keySet()); + final Set names = new HashSet<>(getProperties().keySet()); getDelegates(PropertyEnumerator.class) .forEach(e -> names.addAll(e.getPropertyNames())); return Collections.unmodifiableSet(names);