Fix preparing action with path containing augment
[netconf.git] / netconf / sal-netconf-connector / src / main / java / org / opendaylight / netconf / sal / connect / netconf / util / NetconfMessageTransformUtil.java
index 455835900d507b74a6f049e0b82d9cf8c5042383..0a887bbbea7bf20caadbb296a89b08539bf3a8e3 100644 (file)
@@ -490,7 +490,6 @@ public final class NetconfMessageTransformUtil {
             final Element actionNS, final Iterator<PathArgument> iterator, final Document document) {
         if (iterator.hasNext()) {
             final PathArgument next = iterator.next();
-            final QName actualNS = next.getNodeType();
 
             DataSchemaContextNode<?> current = currentParentSchemaNode.getChild(next);
             Preconditions.checkArgument(current != null, "Invalid input: schema for argument %s not found", next);
@@ -499,6 +498,7 @@ public final class NetconfMessageTransformUtil {
                 return prepareActionData(current, actionNS, iterator, document);
             }
 
+            final QName actualNS = next.getNodeType();
             final Element actualElement = document.createElementNS(actualNS.getNamespace().toString(),
                     actualNS.getLocalName());
             if (next instanceof NodeWithValue) {