ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50297] New: Copy task does not preserve natural ordering of resource collections
Date Fri, 19 Nov 2010 01:47:24 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50297

           Summary: Copy task does not preserve natural ordering of
                    resource collections
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: isaac@shabtay.com


Various resource collections (union, etc) are designed with particular
iteration orders in mind. For example, a "union" stores items in a
LinkedHashSet to preserve ordering.

Turns out, though, that the Copy task doesn't respect the natural ordering of
items.

I am suspecting this is because "fileCopyMap" is a Hashtable; the
"doFileOperations()" method goes over the elements in "fileCopyMap" to execute
the copy instructions.

I took a few minutes (OK, more than a few) to look at the code and it appears
as if changing "fileCopyMap", "dirCopyMap" and perhaps "completeDirMap" to
"LinkedHashMap" instances would resolve this problem.

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

Mime
View raw message