!120 修复TreeUtil根据id查找子节点时的NPE问题

Merge pull request !120 from haichong01/v5-dev
This commit is contained in:
Looly 2020-05-07 15:54:47 +08:00 committed by Gitee
commit 2ea7bfc54b

View File

@ -134,6 +134,11 @@ public class TreeUtil {
return node;
}
//fix NPE
if(null == node.getChildren()) {
return null;
}
// 查找子节点
Tree<T> childNode;
for (Tree<T> child : node.getChildren()) {