unconditionally sort entrySet in <echoproperties>
see https://bz.apache.org/bugzilla/show_bug.cgi?id=66588
diff --git a/WHATSNEW b/WHATSNEW
index eb9d38b..4e4252a 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -41,6 +41,9 @@
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 7404bdc..2eb9182 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 @@
@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)));