https://issues.apache.org/bugzilla/show_bug.cgi?id=46527
Summary: Sort using date comparator on fileset filters entries
Product: Ant
Version: 1.7.1
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=23116)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23116)
Test example with output
Hi,
The implementation of the Sort (sorted resource collection) using a TreeMap
results in a filtering when the entries have the same key; the last entry added
will be the one listed.
E.g I have tried to sort a list of files using the Date comparator and only 29
of the 49 files are listed because multiple files has the exact same last
modified date.
My suggestion is that the implementation should use the Collections sort.
current workaround is:
<sort>
<fileset dir="${path.dist.lib}" includes="**/*.jar" />
<reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
<date />
</reverse>
<name xmlns="antlib:org.apache.tools.ant.types.resources.comparators" />
</sort>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.