for LUCENE-836 sort reuters files by name (otherwise TestQualityRun can fail on some OSs).

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@560428 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Doron Cohen 2007-07-27 23:56:48 +00:00
parent 1bc5a68549
commit f3b9c9407a
1 changed files with 4 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import org.apache.lucene.document.Field;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@ -299,9 +300,10 @@ public abstract class BasicDocMaker implements DocMaker {
return;
}
if (f.isDirectory()) {
File files[] = f.listFiles();
String files[] = f.list();
Arrays.sort(files);
for (int i = 0; i < files.length; i++) {
collectFiles(files[i],inputFiles);
collectFiles(new File(f,files[i]),inputFiles);
}
return;
}