From a31c4501ac73d2401879f0b5fe2012c668293d8c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 24 May 2016 15:05:53 +0100 Subject: [PATCH] Fix typos --- src/main/java/net/kemitix/node/Node.java | 1 + src/main/java/net/kemitix/node/NodeItem.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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"); }