X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fconfig-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fconfignetconfconnector%2Foperations%2Fruntimerpc%2FRuntimeRpc.java;h=98eb17699973cc1e2448c5072421a0e29b205280;hb=1895c1473b803a53ad5e2a092c4dacb4ffed2ee2;hp=5a30fc8352600f524f86224c88ff09a6c5365a68;hpb=6dae254dbc2940d1f0f372d65d69b0e0dda415fe;p=controller.git diff --git a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpc.java b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpc.java index 5a30fc8352..98eb176999 100644 --- a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpc.java +++ b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpc.java @@ -56,7 +56,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation { } private Element toXml(Document doc, Object result, AttributeIfc returnType, String namespace, String elementName) throws NetconfDocumentedException { - AttributeMappingStrategy> mappingStrategy = new ObjectMapper(null).prepareStrategy(returnType); + AttributeMappingStrategy> mappingStrategy = new ObjectMapper().prepareStrategy(returnType); Optional mappedAttributeOpt = mappingStrategy.mapAttribute(result); Preconditions.checkState(mappedAttributeOpt.isPresent(), "Unable to map return value %s as %s", result, returnType.getOpenType()); @@ -139,8 +139,9 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation { final Optional contextInstanceElement = operationElement .getOnlyChildElementOptionally(CONTEXT_INSTANCE); - if (contextInstanceElement.isPresent() == false) + if (!contextInstanceElement.isPresent()){ return HandlingPriority.CANNOT_HANDLE; + } final RuntimeRpcElementResolved id = RuntimeRpcElementResolved.fromXpath(contextInstanceElement.get() .getTextContent(), netconfOperationName, netconfOperationNamespace); @@ -182,7 +183,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation { logger.debug("Invoking operation {} on {} with arguments {}", execution.operationName, execution.on, execution.attributes); - final Object result = executeOperation(configRegistryClient, execution.on, execution.operationName, + final Object result = executeOperation(getConfigRegistryClient(), execution.on, execution.operationName, execution.attributes); logger.trace("Operation {} called successfully on {} with arguments {} with result {}", execution.operationName, @@ -225,7 +226,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation { for (XmlElement xmlElement : xml.getChildElements()) { final String name = xmlElement.getName(); - if (CONTEXT_INSTANCE.equals(name) == false) { // skip context + if (!CONTEXT_INSTANCE.equals(name)) { // skip context // instance child node // because it // specifies