NodeItem::insertInPath: clarify local variable name

This commit is contained in:
Paul Campbell 2016-09-20 22:24:28 +01:00
parent f9aba88d0c
commit 753b37cc1d

View file

@ -264,8 +264,8 @@ class NodeItem<T> implements Node<T> {
if (path.length == 0) {
insertChild(nodeItem);
} else {
val item = path[0];
findChildByName(item).orElseGet(() -> new NodeItem<>(null, item, this))
val nextInPath = path[0];
findChildByName(nextInPath).orElseGet(() -> new NodeItem<>(null, nextInPath, this, new HashSet<>()))
.insertInPath(nodeItem, Arrays.copyOfRange(path, 1, path.length));
}
}