Skip to content

Commit 19b1865

Browse files
committed
调整代码顺序
1 parent 416a7fb commit 19b1865

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/bestvike/linq/enumerable/SequenceEqual.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ public static <TSource> boolean sequenceEqual(IEnumerable<TSource> first, IEnume
2020
}
2121

2222
public static <TSource> boolean sequenceEqual(IEnumerable<TSource> first, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer) {
23-
if (comparer == null)
24-
comparer = EqualityComparer.Default();
2523
if (first == null)
2624
throw Errors.argumentNull("first");
2725
if (second == null)
2826
throw Errors.argumentNull("second");
29-
27+
if (comparer == null)
28+
comparer = EqualityComparer.Default();
29+
3030
if (first instanceof ICollection && second instanceof ICollection) {
3131
ICollection<TSource> firstCol = (ICollection<TSource>) first;
3232
ICollection<TSource> secondCol = (ICollection<TSource>) second;

0 commit comments

Comments
 (0)