This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push: new 576f293 Inline Collections.sort(Comparator). 576f293 is described below commit 576f2933beca0797e6cf2075aae8fdf39b741fec Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Feb 13 11:55:59 2022 -0500 Inline Collections.sort(Comparator). --- .../src/test/java/org/apache/commons/vfs2/ProviderReadTests.java | 3 +-- .../apache/commons/vfs2/provider/test/FileObjectSortTestCase.java | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderReadTests.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderReadTests.java index f7d69ad..213cf16 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderReadTests.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/ProviderReadTests.java @@ -19,7 +19,6 @@ package org.apache.commons.vfs2; import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.List; import org.junit.Assert; @@ -317,7 +316,7 @@ public class ProviderReadTests extends AbstractProviderTestCase { // Compare actual and expected list of files final List<FileObject> expectedFiles = selector.finish(); - Collections.sort(expectedFiles); + expectedFiles.sort(null); assertEquals(expectedFiles.size(), actualFiles.length); final int count = expectedFiles.size(); for (int i = 0; i < count; i++) { diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/test/FileObjectSortTestCase.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/test/FileObjectSortTestCase.java index 076c592..5b5ad3b 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/test/FileObjectSortTestCase.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/test/FileObjectSortTestCase.java @@ -17,7 +17,6 @@ package org.apache.commons.vfs2.provider.test; import java.util.Arrays; -import java.util.Collections; import java.util.List; import org.apache.commons.vfs2.FileObject; @@ -117,7 +116,7 @@ public class FileObjectSortTestCase { final List<FileObject> actualList = Arrays.asList(UnSortedArray); final List<FileObject> expectedSortedList = Arrays.asList(SortedArray); Assert.assertNotEquals(actualList, expectedSortedList); - Collections.sort(actualList); + actualList.sort(null); Assert.assertEquals(actualList, expectedSortedList); } @@ -130,7 +129,7 @@ public class FileObjectSortTestCase { public void testSortListMoveNone() throws FileSystemException { final List<FileObject> actualList = Arrays.asList(SortedArray); final List<FileObject> expectedSortedList = Arrays.asList(SortedArray); - Collections.sort(actualList); + actualList.sort(null); Assert.assertEquals(actualList, expectedSortedList); }