Skip to content

Commit

Permalink
Use Collections.sort(List) for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jun 23, 2024
1 parent de1d273 commit f5e0f2c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public void testCollate() {

final List<Integer> combinedList = new ArrayList<>(collectionD);
combinedList.addAll(collectionE);
combinedList.sort(null);
Collections.sort(combinedList);

assertEquals(combinedList, result2, "Merge two lists 2");

Expand Down Expand Up @@ -640,7 +640,7 @@ public void testCollateIgnoreDuplicates() {
final Set<Integer> combinedSet = new HashSet<>(collectionD);
combinedSet.addAll(collectionE);
final List<Integer> combinedList = new ArrayList<>(combinedSet);
combinedList.sort(null);
Collections.sort(combinedList);

assertEquals(combinedList, result2, "Merge two lists 2 - ignore duplicates");
}
Expand Down

0 comments on commit f5e0f2c

Please sign in to comment.