Merge "BUG 652 leafref CCE & BUG 720 colons problem"
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / mapping / attributes / fromxml / AbstractAttributeReadingStrategy.java
index 793911262810f826f332f84c75bb642bb1d7fe6e..701e96ecd95b8853fcee8ccf75b98a9ac6cb1b47 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
 
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
 
 import java.util.List;
@@ -25,14 +26,14 @@ public abstract class AbstractAttributeReadingStrategy implements AttributeReadi
     }
 
     @Override
-    public AttributeConfigElement readElement(List<XmlElement> configNodes) {
-        if (configNodes.size() == 0)
+    public AttributeConfigElement readElement(List<XmlElement> configNodes) throws NetconfDocumentedException {
+        if (configNodes.size() == 0){
             return AttributeConfigElement.createNullValue(postprocessNullableDefault(nullableDefault));
-
+        }
         return readElementHook(configNodes);
     }
 
-    abstract AttributeConfigElement readElementHook(List<XmlElement> configNodes);
+    abstract AttributeConfigElement readElementHook(List<XmlElement> configNodes) throws NetconfDocumentedException;
 
     protected Object postprocessNullableDefault(String nullableDefault) {
         return nullableDefault;