NodeItem: put trailing comments on their own line
This commit is contained in:
parent
3d94eaeb32
commit
5c129b54b8
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue