mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
几个小优化:
1.优化CollUtil.map()方法, 减少流中的无意义操作; 2.优化ArrayUtil.get()方法, 使用合理的逻辑判断 代替 使用异常判断null值;
This commit is contained in:
@@ -147,7 +147,7 @@ public class GraphTest {
|
||||
Assert.assertEquals(asSet(2, 0), graph.getAdjacentPoints(3));
|
||||
}
|
||||
|
||||
|
||||
@SafeVarargs
|
||||
private static <T> Set<T> asSet(T... ts) {
|
||||
return new LinkedHashSet<>(Arrays.asList(ts));
|
||||
}
|
||||
|
Reference in New Issue
Block a user