- Preconditions.checkNotNull(namespace);
- compositeNode = NodeFactory.createMutableCompositeNode(new QName(namespace, localName),
- parent, new ArrayList<Node<?>>(), ModifyAction.CREATE, null);
-
- List<Node<?>> nodeValues = new ArrayList<>();
+ if (name == null) {
+ Preconditions.checkNotNull(namespace);
+ name = new QName(namespace, localName);
+ }
+
+ List<Node<?>> nodeValues = new ArrayList<>(values.size());