From b456e183161caba29c015abd69a65de81fdc9463 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 24 May 2016 11:53:13 +0100 Subject: [PATCH] NodeItem: fix up --- src/main/java/net/kemitix/node/NodeItem.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/kemitix/node/NodeItem.java b/src/main/java/net/kemitix/node/NodeItem.java index f338e9a..bc87179 100644 --- a/src/main/java/net/kemitix/node/NodeItem.java +++ b/src/main/java/net/kemitix/node/NodeItem.java @@ -287,6 +287,10 @@ public class NodeItem implements Node { public Node createChild(final T child) { if (child == null) { throw new NullPointerException("child"); + } + return new NodeItem<>(child, this); + } + @Override public Optional> findChildNamed(final String named) { if (named == null) { @@ -386,8 +390,4 @@ public class NodeItem implements Node { return name != null && name.length() > 0; } - } - return new NodeItem<>(child, this); - } - }