diff --git a/src/main/java/net/kemitix/node/Node.java b/src/main/java/net/kemitix/node/Node.java index e2f074f..19cc60a 100644 --- a/src/main/java/net/kemitix/node/Node.java +++ b/src/main/java/net/kemitix/node/Node.java @@ -92,6 +92,7 @@ public interface Node { * Creates a new named node and adds it as a child of the current node. * * @param child the child node's data + * @param name the name * * @return the new child node */ diff --git a/src/main/java/net/kemitix/node/NodeItem.java b/src/main/java/net/kemitix/node/NodeItem.java index acd883d..ddb402a 100644 --- a/src/main/java/net/kemitix/node/NodeItem.java +++ b/src/main/java/net/kemitix/node/NodeItem.java @@ -190,6 +190,7 @@ public class NodeItem implements Node { } @Override + @SuppressWarnings("hiddenfield") public Node createChild(final T child, final String name) { Node node = createChild(child); node.setName(name); @@ -249,8 +250,9 @@ public class NodeItem implements Node { @Override public Node getChild(final T child) { Optional> optional = findChild(child); - if (optional.isPresent()) + if (optional.isPresent()) { return optional.get(); + } throw new NodeException("Child not found"); }