mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
!831 【6.x】优化EasyStream中toTree对predicate的处理,过滤掉id为null的元素,避免StackOverflow
Merge pull request !831 from 阿超/v6-dev
This commit is contained in:
@@ -434,6 +434,8 @@ public class EasyStreamTest {
|
||||
Consumer<Object> test = o -> {
|
||||
final List<Student> studentTree = EasyStream
|
||||
.of(
|
||||
// 会过滤掉id为null的元素
|
||||
Student.builder().name("top").build(),
|
||||
Student.builder().id(1L).name("dromara").build(),
|
||||
Student.builder().id(2L).name("baomidou").build(),
|
||||
Student.builder().id(3L).name("hutool").parentId(1L).build(),
|
||||
|
Reference in New Issue
Block a user