mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
CollUtil.split优化切割列表参数判断,避免OOM
This commit is contained in:
parent
1c6c15df07
commit
cbc2246a37
@ -2,13 +2,14 @@
|
||||
# 🚀Changelog
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.17.M1 (2023-03-28)
|
||||
# 5.8.17.M1 (2023-03-29)
|
||||
|
||||
### 🐣新特性
|
||||
* 【core 】 SerializeUtil.deserialize增加白名单类,避免RCE vulnerability(issue#3021@Github)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【core 】 CollUtil.split优化切割列表参数判断,避免OOM
|
||||
* 【core 】 CollUtil.split优化切割列表参数判断,避免OOM(pr#3026@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.16 (2023-03-26)
|
||||
|
||||
|
@ -923,6 +923,7 @@ public class CollUtilTest {
|
||||
Assert.assertEquals("bb", distinct.get(1).getName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConstantValue")
|
||||
@Test
|
||||
public void unionNullTest() {
|
||||
final List<String> list1 = new ArrayList<>();
|
||||
@ -932,6 +933,7 @@ public class CollUtilTest {
|
||||
Assert.assertNotNull(union);
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConstantValue")
|
||||
@Test
|
||||
public void unionDistinctNullTest() {
|
||||
final List<String> list1 = new ArrayList<>();
|
||||
@ -941,6 +943,7 @@ public class CollUtilTest {
|
||||
Assert.assertNotNull(set);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"ConfusingArgumentToVarargsMethod", "ConstantValue"})
|
||||
@Test
|
||||
public void unionAllNullTest() {
|
||||
final List<String> list1 = new ArrayList<>();
|
||||
@ -949,7 +952,7 @@ public class CollUtilTest {
|
||||
final List<String> list = CollUtil.unionAll(list1, list2, list3);
|
||||
Assert.assertNotNull(list);
|
||||
|
||||
@SuppressWarnings("ConfusingArgumentToVarargsMethod") final List<String> resList2 = CollUtil.unionAll(null, null, null);
|
||||
final List<String> resList2 = CollUtil.unionAll(null, null, null);
|
||||
Assert.assertNotNull(resList2);
|
||||
}
|
||||
|
||||
@ -998,6 +1001,7 @@ public class CollUtilTest {
|
||||
list.toArray());
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConstantValue")
|
||||
@Test
|
||||
public void intersectionNullTest() {
|
||||
final List<String> list1 = new ArrayList<>();
|
||||
|
Loading…
Reference in New Issue
Block a user