diff --git a/src/main/java/net/kemitix/node/NodeItem.java b/src/main/java/net/kemitix/node/NodeItem.java index d35366a..2a6b4ba 100644 --- a/src/main/java/net/kemitix/node/NodeItem.java +++ b/src/main/java/net/kemitix/node/NodeItem.java @@ -110,10 +110,7 @@ public class NodeItem implements Node { @Override public Optional> walkTree(@NonNull final List path) { if (path.size() > 0) { - Optional> found = children.stream() - .filter((Node child) -> path.get(0) - .equals(child.getData())) - .findFirst(); + Optional> found = getChild(path.get(0)); if (found.isPresent()) { if (path.size() > 1) { return found.get().walkTree(path.subList(1, path.size()));