Bug Report: Alphabetical ordering problem. ( same as CORE-586)

Hello there.

The issue reported and fixed in http://liquibase.jira.com/browse/CORE-586 should be applied to the other implementations of liquibase.resource.ResourceAccessor found at http://liquibase.jira.com/svn/CORE/trunk/liquibase-core/src/main/java/liquibase/resource/

We currently have a problem with ordering when we load our change sets from the classpath, which we have worked around by loading from file system.

Let me know if you need any more info (I’d be happy to provide a patch too if you prefer)


Thanks for pointing it out.  It was a quick fix, so the change should be in trunk now for the next RC release. 

I ended up doing the sorting with the includeAll logic, so we don’t have to depend on the ResourceAccessors remembering to sort them.


Cool. Thanks for fixing this so quickly.

Hi Nathan,

I updated to trunk but I still have this issue. After checking the source I can see the fix applied to XMLChangeLogSAXHandler but it only appears to sort the root directories listed in the includeAll tag and not the files listed in these directories.

I replaced

    for (File childFile : file.listFiles()) { //Around line 195


    for (File childFile : new TreeSet(Arrays.asList(file.listFiles()))) {

to fix this.



Thanks for testing it and for the fix.  It is committed now.  I just had a windows machine to test with, so I was running the logic in my head. Gotta learn to stop doing that :slight_smile: