!831 【6.x】优化EasyStream中toTree对predicate的处理,过滤掉id为null的元素,避免StackOverflow

Merge pull request !831 from 阿超/v6-dev
This commit is contained in:
Looly
2022-10-08 10:27:23 +00:00
committed by Gitee
3 changed files with 14 additions and 21 deletions

View File

@@ -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(),