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: [email protected]
        ReportedBy: [email protected]


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.

Reply via email to