NodeItem: put trailing comments on their own line

This commit is contained in:
Paul Campbell 2016-08-22 09:04:16 +01:00
parent 3d94eaeb32
commit 5c129b54b8

View file

@ -279,13 +279,15 @@ class NodeItem<T> implements Node<T> {
@Override @Override
public void insertInPath(final Node<T> nodeItem, final String... path) { public void insertInPath(final Node<T> nodeItem, final String... path) {
if (path.length == 0) { if (path.length == 0) {
if (!nodeItem.isNamed()) { // nothing to conflict with if (!nodeItem.isNamed()) {
// nothing to conflict with
addChild(nodeItem); addChild(nodeItem);
return; return;
} }
String nodeName = nodeItem.getName(); String nodeName = nodeItem.getName();
final Optional<Node<T>> childNamed = findChildByName(nodeName); final Optional<Node<T>> childNamed = findChildByName(nodeName);
if (!childNamed.isPresent()) { // nothing with the same name exists if (!childNamed.isPresent()) {
// nothing with the same name exists
addChild(nodeItem); addChild(nodeItem);
return; return;
} }