This is an automated email from the ASF dual-hosted git repository. bodewig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ant.git
commit d08818ad6de7e1ce3228db970125987bb3dc3d7c Author: Stefan Bodewig <bode...@apache.org> AuthorDate: Sun May 14 11:24:05 2023 +0200 unconditionally sort entrySet in <echoproperties> see https://bz.apache.org/bugzilla/show_bug.cgi?id=66588 --- WHATSNEW | 3 +++ src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index eb9d38b6b..4e4252ab1 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -41,6 +41,9 @@ Other changes: for runnning the forked tests. Bugzilla Report 66464 + * made sure <echoproperties> sorts the echoed properties on JDK9+ as well. + Bugzilla Report 66588 + Changes from Ant 1.10.12 TO Ant 1.10.13 ======================================= diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java index 7404bdcae..2eb91820d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java @@ -359,16 +359,12 @@ public class EchoProperties extends Task { @Override public Set<Map.Entry<Object, Object>> entrySet() { - Set<Map.Entry<Object, Object>> result = super.entrySet(); - if (JavaEnvUtils.isKaffe()) { Set<Map.Entry<Object, Object>> t = new TreeSet<>(Comparator.comparing( ((Function<Map.Entry<Object, Object>, Object>) Map.Entry::getKey) .andThen(Object::toString))); - t.addAll(result); + t.addAll(super.entrySet()); return t; - } - return result; } }; allProps.forEach((k, v) -> props.put(String.valueOf(k), String.valueOf(v)));