Bug 460 - Fix warning throughout netconf subsystem
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / operations / editconfig / EditConfig.java
index 428ddb3b740dfbb5e34e62bff86035d0e9464b03..3ea26055f33c79212debc907caa259109f7101a2 100644 (file)
@@ -72,11 +72,11 @@ public class EditConfig extends AbstractConfigNetconfOperation {
             final EditConfigXmlParser.EditConfigExecution editConfigExecution) throws NetconfDocumentedException, NetconfConfigHandlingException {
 
         if (editConfigExecution.shouldTest()) {
-            executeTests(configRegistryClient, editConfigExecution);
+            executeTests(getConfigRegistryClient(), editConfigExecution);
         }
 
         if (editConfigExecution.shouldSet()) {
-            executeSet(configRegistryClient, editConfigExecution);
+            executeSet(getConfigRegistryClient(), editConfigExecution);
         }
 
         logger.trace("Operation {} successful", EditConfigXmlParser.EDIT_CONFIG);
@@ -224,7 +224,7 @@ public class EditConfig extends AbstractConfigNetconfOperation {
 
         void addIdSchemaNode(IdentitySchemaNode node) {
             String name = node.getQName().getLocalName();
-            Preconditions.checkState(identityNameToSchemaNode.containsKey(name) == false);
+            Preconditions.checkState(!identityNameToSchemaNode.containsKey(name));
             identityNameToSchemaNode.put(name, node);
         }
 
@@ -250,7 +250,7 @@ public class EditConfig extends AbstractConfigNetconfOperation {
             }
 
             Date revision = module.getRevision();
-            Preconditions.checkState(revisionsByNamespace.containsKey(revision) == false,
+            Preconditions.checkState(!revisionsByNamespace.containsKey(revision),
                     "Duplicate revision %s for namespace %s", revision, namespace);
 
             IdentityMapping identityMapping = revisionsByNamespace.get(revision);
@@ -306,8 +306,8 @@ public class EditConfig extends AbstractConfigNetconfOperation {
     protected Element handleWithNoSubsequentOperations(Document document, XmlElement xml) throws NetconfDocumentedException {
 
         EditConfigXmlParser.EditConfigExecution editConfigExecution;
-        Config cfg = getConfigMapping(configRegistryClient, yangStoreSnapshot);
-        editConfigExecution = editConfigXmlParser.fromXml(xml, cfg, transactionProvider, configRegistryClient);
+        Config cfg = getConfigMapping(getConfigRegistryClient(), yangStoreSnapshot);
+        editConfigExecution = editConfigXmlParser.fromXml(xml, cfg, transactionProvider, getConfigRegistryClient());
 
         Element responseInternal;
         responseInternal = getResponseInternal(document, editConfigExecution);