diff options
author | Stefan Bodewig <bodewig@apache.org> | 2023-05-14 11:24:05 +0200 |
---|---|---|
committer | Stefan Bodewig <bodewig@apache.org> | 2023-05-14 11:26:39 +0200 |
commit | d08818ad6de7e1ce3228db970125987bb3dc3d7c (patch) | |
tree | 90473b23b4a25e55151bba59957b758741ecac64 | |
parent | 8fb54871b93fb62aa597a8094561bfa8977e5aba (diff) | |
download | ant-d08818ad6de7e1ce3228db970125987bb3dc3d7c.tar.gz |
unconditionally sort entrySet in <echoproperties>
see https://bz.apache.org/bugzilla/show_bug.cgi?id=66588
-rw-r--r-- | WHATSNEW | 3 | ||||
-rw-r--r-- | src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java | 6 |
2 files changed, 4 insertions, 5 deletions
@@ -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))); |