NodeItem: fix up
This commit is contained in:
parent
45bd77bbca
commit
b456e18316
1 changed files with 4 additions and 4 deletions
|
@ -287,6 +287,10 @@ public class NodeItem<T> implements Node<T> {
|
||||||
public Node<T> createChild(final T child) {
|
public Node<T> createChild(final T child) {
|
||||||
if (child == null) {
|
if (child == null) {
|
||||||
throw new NullPointerException("child");
|
throw new NullPointerException("child");
|
||||||
|
}
|
||||||
|
return new NodeItem<>(child, this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<Node<T>> findChildNamed(final String named) {
|
public Optional<Node<T>> findChildNamed(final String named) {
|
||||||
if (named == null) {
|
if (named == null) {
|
||||||
|
@ -386,8 +390,4 @@ public class NodeItem<T> implements Node<T> {
|
||||||
return name != null && name.length() > 0;
|
return name != null && name.length() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
return new NodeItem<>(child, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue