diff --git a/src/main/java/net/kemitix/node/NodeItem.java b/src/main/java/net/kemitix/node/NodeItem.java index 0751a3e..13efcb5 100644 --- a/src/main/java/net/kemitix/node/NodeItem.java +++ b/src/main/java/net/kemitix/node/NodeItem.java @@ -18,7 +18,7 @@ public class NodeItem implements Node { private Node parent; - private Set> children; + private final Set> children = new HashSet<>(); /** * Creates a root node. @@ -43,7 +43,6 @@ public class NodeItem implements Node { if (parent != null) { setParent(parent); } - this.children = new HashSet<>(); } @Override