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 2009/01/14 12:20:13 UTC

DO NOT REPLY [Bug 46527] New: Sort using date comparator on fileset filters entries

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: notifications@ant.apache.org
        ReportedBy: kep@cdrator.com


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.

DO NOT REPLY [Bug 46527] Sort using date comparator on fileset filters entries

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46527


Matt Benson <gu...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|1.7.1                       |1.8.0




--- Comment #2 from Matt Benson <gu...@yahoo.com>  2009-01-15 16:08:28 PST ---
Committed revision 734866 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=734866 ).


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46527] Sort using date comparator on fileset filters entries

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46527





--- Comment #1 from Matt Benson <gu...@yahoo.com>  2009-01-14 07:38:28 PST ---
verified...


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46527] Sort using date comparator on fileset filters entries

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46527


Kim Ekström <ke...@cdrator.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.