You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2023/05/02 17:12:50 UTC
[Bug 66588] New: EchoProperties sorting broken for Oracle JDK9+
https://bz.apache.org/bugzilla/show_bug.cgi?id=66588
Bug ID: 66588
Summary: EchoProperties sorting broken for Oracle JDK9+
Product: Ant
Version: 1.10.13
Hardware: PC
Status: NEW
Severity: enhancement
Priority: P2
Component: Optional Tasks
Assignee: notifications@ant.apache.org
Reporter: robert.flaherty@oracle.com
Target Milestone: ---
After reading this:
https://stackoverflow.com/questions/10275862/how-to-sort-properties-in-java
it looks like Properties internal store0() switched from keys() to entrySet()
for the enumeration between JDK8 and JDK9. The EchoProperties task "text" sort
is done in saveProperties() with a stream sorted() call for the keys()
override, and a comparator for the entrySet() override. But in entrySet() it
test JavaEnvUtils.isKaffe()
, and this prevents the sorting. Was this meant to be !JavaEnvUtils.isKaffe()
as in they don't support streaming?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 66588] EchoProperties sorting broken for Oracle JDK9+
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66588
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
the "isKaffee" check deliberately is the way it is, see
https://github.com/apache/ant/commit/cd02e2101cf2013c2f879477ef53b2be74092673 -
the code didn't use Streams back when Matt committed it :-)
I don't believe we officially ever promised the properties would be sorted but
this obviously is what the code is trying to do. Anyway, I agree removing the
isKaffee check would resolve the issue.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 66588] EchoProperties sorting broken for Oracle JDK9+
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66588
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 66588] EchoProperties sorting broken for Oracle JDK9+
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66588
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |1.10.14
--- Comment #2 from Stefan Bodewig <bo...@apache.org> ---
fixed with d08818ad6
--
You are receiving this mail because:
You are the assignee for the bug.