Collections.sort instead of non-java7 List.sort
authorNiki Roo <niki@nikiroo.be>
Fri, 5 Oct 2018 12:44:14 +0000 (14:44 +0200)
committerNiki Roo <niki@nikiroo.be>
Fri, 5 Oct 2018 12:44:14 +0000 (14:44 +0200)
src/be/nikiroo/utils/test/TestCase.java

index 2e46a7b5472af4eabc2a5ecb4aea4e4d6d6fe89c..0210e2fe0963c2b4e63a4b6056bd783f550243e9 100644 (file)
@@ -2,6 +2,7 @@ package be.nikiroo.utils.test;
 
 import java.io.File;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -405,9 +406,9 @@ abstract public class TestCase {
                                        expected.isDirectory(), actual.isDirectory());
 
                        List<String> expectedFiles = Arrays.asList(expected.list());
-                       expectedFiles.sort(null);
+                       Collections.sort(expectedFiles);
                        List<String> actualFiles = Arrays.asList(actual.list());
-                       actualFiles.sort(null);
+                       Collections.sort(actualFiles);
 
                        assertEquals(errorMessage, expectedFiles, actualFiles);
                        for (int i = 0; i < actualFiles.size(); i++) {