- List<String> resultFiles = Arrays.asList(resultDir.list(filter));
- resultFiles.sort(null);
- List<String> expectedFiles = Arrays.asList(expectedDir.list(filter));
- expectedFiles.sort(null);
+ List<String> resultFiles;
+ List<String> expectedFiles;
+ {
+ String[] resultArr = resultDir.list(filter);
+ Arrays.sort(resultArr);
+ resultFiles = Arrays.asList(resultArr);
+ String[] expectedArr = expectedDir.list(filter);
+ Arrays.sort(expectedArr);
+ expectedFiles = Arrays.asList(expectedArr);
+ }