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 bc8ee696c0d99b92267841277542cbdac901a2c8..2bb3daa15b6e3fcf2ba92f5e958923556e78732b 100644 (file)
@@ -416,7 +416,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);
@@ -425,6 +424,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) {