Bug 1062 - Disallow implicit serviceref creation.
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / mapping / attributes / fromxml / ArrayAttributeReadingStrategy.java
index 8f569619001c0d8c60697a92d160e730740ba567..1b74d49c4f6fc4b30069c12fd5d9416e5561af63 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.mapping.attributes.fromxml;
 
 import com.google.common.collect.Lists;
+import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
 import org.opendaylight.controller.netconf.util.xml.XmlElement;
 
 import java.util.List;
@@ -27,10 +28,10 @@ public class ArrayAttributeReadingStrategy extends AbstractAttributeReadingStrat
     }
 
     @Override
-    AttributeConfigElement readElementHook(List<XmlElement> configNodes) {
+    AttributeConfigElement readElementHook(List<XmlElement> configNodes) throws NetconfDocumentedException {
         List<Object> innerList = Lists.newArrayList();
-        for (int i = 0; i < configNodes.size(); i++) {
-            innerList.add(innerStrategy.readElement(Lists.newArrayList(configNodes.get(i))).getValue());
+        for (XmlElement configNode : configNodes) {
+            innerList.add(innerStrategy.readElement(Lists.newArrayList(configNode)).getValue());
         }
         return AttributeConfigElement.create(getNullableDefault(), innerList);
     }