Convert anyxml nodes lazily
[netconf.git] / netconf / sal-netconf-connector / src / main / java / org / opendaylight / netconf / sal / connect / netconf / util / NetconfMessageTransformUtil.java
index 83d903b686d9ce993a9fb3249d5957b0338ce5d9..44c0d4de5dc61d1023fc48788d87f157baedfa46 100644 (file)
@@ -36,6 +36,7 @@ import org.opendaylight.netconf.api.xml.XmlUtil;
 import org.opendaylight.netconf.notifications.NetconfNotification;
 import org.opendaylight.netconf.sal.connect.util.MessageCounter;
 import org.opendaylight.netconf.util.NetconfUtil;
+import org.opendaylight.netconf.util.NodeContainerProxy;
 import org.opendaylight.netconf.util.messages.NetconfMessageUtil;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.edit.config.input.EditContent;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionInput;
@@ -443,7 +444,7 @@ public final class NetconfMessageTransformUtil {
         final Element actionData = prepareActionData(rootSchemaContextNode, actionNS,
                 domDataTreeIdentifier.getRootIdentifier().getPathArguments().iterator(), document);
 
-        Element specificActionElement = document.createElement(action);
+        final Element specificActionElement = document.createElement(action);
         actionData.appendChild(specificActionElement);
         rpcNS.appendChild(actionNS);
         document.appendChild(rpcNS);
@@ -455,7 +456,7 @@ public final class NetconfMessageTransformUtil {
         if (iterator.hasNext()) {
             final PathArgument next = iterator.next();
 
-            DataSchemaContextNode<?> current = currentParentSchemaNode.getChild(next);
+            final DataSchemaContextNode<?> current = currentParentSchemaNode.getChild(next);
             Preconditions.checkArgument(current != null, "Invalid input: schema for argument %s not found", next);
 
             if (current.isMixin()) {