On Thu, 18 Sep 2008, Steve Loughran <[EMAIL PROTECTED]> wrote:

> Kevin Jackson wrote:
> 
> > That's a huge difference - what are we doing now in 1.7.1 that is
> > different from before?
> 
> I think it tries to sort stuff less.
>
> This broke hadoop builds as their class structure was wrong
> https://issues.apache.org/jira/browse/HADOOP-3907

Once upon a time DirectoryScanner used to return files in a
predictable order - something like DFS where the files from
directories appear as directories are visited in DFS order.

The order of files coming from the same directory as well as
directories at the same height in the tree dependend on File.list and
likely was in lexicographic order.

This still is true if there is a basedir and DirectoryScanner decides
that it needs to scan the full tree, but starting with rev 274819
(i.e. <https://issues.apache.org/bugzilla/show_bug.cgi?id=20103>,
which means Ant 1.6) this is not true if there are only include
patterns that don't start with wildcards.

In the later case only the directories that could be included will be
scanned and order of directories is undefined (they get added as keys
to a map and then scanned in iterator order of the map).

Given that this happened such a long time ago, we can savely assume
that in general order of files/directories returned by
DirectoryScanner is not defined.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to