Use Collections.sort(List) for clarity
This commit is contained in:
parent
f55d552c90
commit
5ebd823ae3
|
@ -165,7 +165,7 @@ public class FluentIterableTest {
|
|||
final List<Integer> combinedList = new ArrayList<>();
|
||||
CollectionUtils.addAll(combinedList, iterableOdd);
|
||||
CollectionUtils.addAll(combinedList, iterableEven);
|
||||
combinedList.sort(null);
|
||||
Collections.sort(combinedList);
|
||||
assertEquals(combinedList, result);
|
||||
|
||||
assertThrows(NullPointerException.class, () -> FluentIterable.of(iterableOdd).collate(null).toList(),
|
||||
|
@ -183,7 +183,7 @@ public class FluentIterableTest {
|
|||
final List<Integer> combinedList = new ArrayList<>();
|
||||
CollectionUtils.addAll(combinedList, iterableOdd);
|
||||
CollectionUtils.addAll(combinedList, iterableEven);
|
||||
combinedList.sort(null);
|
||||
Collections.sort(combinedList);
|
||||
assertEquals(combinedList, result);
|
||||
|
||||
// null comparator is equivalent to natural ordering
|
||||
|
@ -446,7 +446,7 @@ public class FluentIterableTest {
|
|||
List<Integer> combinedList = new ArrayList<>();
|
||||
CollectionUtils.addAll(combinedList, iterableOdd);
|
||||
CollectionUtils.addAll(combinedList, iterableEven);
|
||||
combinedList.sort(null);
|
||||
Collections.sort(combinedList);
|
||||
assertEquals(combinedList, result);
|
||||
|
||||
assertThrows(NullPointerException.class, () -> FluentIterable.of(iterableOdd).zip((Iterable<Integer>) null).toList(),
|
||||
|
|
Loading…
Reference in New Issue