NodeItem::insertInPath: clarify local variable name
This commit is contained in:
parent
f9aba88d0c
commit
753b37cc1d
1 changed files with 3 additions and 3 deletions
|
@ -264,9 +264,9 @@ class NodeItem<T> implements Node<T> {
|
||||||
if (path.length == 0) {
|
if (path.length == 0) {
|
||||||
insertChild(nodeItem);
|
insertChild(nodeItem);
|
||||||
} else {
|
} else {
|
||||||
val item = path[0];
|
val nextInPath = path[0];
|
||||||
findChildByName(item).orElseGet(() -> new NodeItem<>(null, item, this))
|
findChildByName(nextInPath).orElseGet(() -> new NodeItem<>(null, nextInPath, this, new HashSet<>()))
|
||||||
.insertInPath(nodeItem, Arrays.copyOfRange(path, 1, path.length));
|
.insertInPath(nodeItem, Arrays.copyOfRange(path, 1, path.length));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue