mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 04:13:49 +08:00
fix NPE in TreeUtil getNode
This commit is contained in:
parent
7480d710cb
commit
5b3f989f7f
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user