Merge "Remove unused controller config dependencies"
[netconf.git] / netconf / config-netconf-connector / src / main / java / org / opendaylight / netconf / confignetconfconnector / operations / Validate.java
index 61d05bc9f8119992d1fb7ab3c188b1ce7352b00b..7c4e823e389829a5f496c09d5e38d105b7dbdf51 100644 (file)
@@ -48,9 +48,10 @@ public class Validate extends AbstractConfigNetconfOperation {
         final String datastoreValue = sourceChildNode.getName();
         final Datastore sourceDatastore = Datastore.valueOf(datastoreValue);
 
-        if (sourceDatastore != Datastore.candidate){
-            throw new DocumentedException( "Only " + Datastore.candidate
-                    + " is supported as source for " + VALIDATE + " but was " + datastoreValue, ErrorType.APPLICATION, ErrorTag.DATA_MISSING, ErrorSeverity.ERROR);
+        if (sourceDatastore != Datastore.candidate) {
+            throw new DocumentedException("Only " + Datastore.candidate
+                    + " is supported as source for " + VALIDATE + " but was " + datastoreValue, ErrorType.APPLICATION,
+                    ErrorTag.DATA_MISSING, ErrorSeverity.ERROR);
         }
     }
 
@@ -60,7 +61,8 @@ public class Validate extends AbstractConfigNetconfOperation {
     }
 
     @Override
-    protected Element handleWithNoSubsequentOperations(final Document document, final XmlElement xml) throws DocumentedException {
+    protected Element handleWithNoSubsequentOperations(final Document document,
+                                                       final XmlElement xml) throws DocumentedException {
         checkXml(xml);
         try {
             getConfigSubsystemFacade().validateConfiguration();
@@ -72,7 +74,8 @@ public class Validate extends AbstractConfigNetconfOperation {
             final Map<String, String> errorInfo = new HashMap<>();
             errorInfo
                     .put(ErrorTag.OPERATION_FAILED.name(),
-                            "Datastore is not present. Use 'get-config' or 'edit-config' before triggering 'operations' operation");
+                            "Datastore is not present. "
+                                    + "Use 'get-config' or 'edit-config' before triggering 'operations' operation");
             throw new DocumentedException(e.getMessage(), e, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED,
                     ErrorSeverity.ERROR, errorInfo);