Fix checkstyle issues to enforce it
[controller.git] / opendaylight / config / config-manager-facade-xml / src / main / java / org / opendaylight / controller / config / facade / xml / mapping / attributes / fromxml / CompositeAttributeReadingStrategy.java
index 6f4aefd9e11680684f453a708702da14e5957b8c..f35281411ab008a8e2664061133cbceee9b0ddd0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2015, 2017 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -24,14 +24,14 @@ public class CompositeAttributeReadingStrategy extends AbstractAttributeReadingS
 
     private final Map<String, AttributeReadingStrategy> innerStrategies;
 
-    public CompositeAttributeReadingStrategy(String nullableDefault,
-            Map<String, AttributeReadingStrategy> innerStrategies) {
+    public CompositeAttributeReadingStrategy(final String nullableDefault,
+            final Map<String, AttributeReadingStrategy> innerStrategies) {
         super(nullableDefault);
         this.innerStrategies = innerStrategies;
     }
 
     @Override
-    AttributeConfigElement readElementHook(List<XmlElement> configNodes) throws DocumentedException {
+    AttributeConfigElement readElementHook(final List<XmlElement> configNodes) throws DocumentedException {
 
         Preconditions.checkState(configNodes.size() == 1, "This element should be present only once %s", configNodes);
 
@@ -41,14 +41,13 @@ public class CompositeAttributeReadingStrategy extends AbstractAttributeReadingS
 
         List<XmlElement> recognisedChildren = Lists.newArrayList();
         for (Entry<String, AttributeReadingStrategy> innerAttrEntry : innerStrategies.entrySet()) {
-            List<XmlElement> childItem = complexElement.getChildElementsWithSameNamespace(
-                    innerAttrEntry.getKey());
+            List<XmlElement> childItem = complexElement.getChildElementsWithSameNamespace(innerAttrEntry.getKey());
             recognisedChildren.addAll(childItem);
 
             AttributeConfigElement resolvedInner = innerAttrEntry.getValue().readElement(childItem);
 
             Object value = resolvedInner.getValue();
-            if(value == null) {
+            if (value == null) {
                 value = resolvedInner.getDefaultValue();
             }
 
@@ -60,8 +59,9 @@ public class CompositeAttributeReadingStrategy extends AbstractAttributeReadingS
         String perInstanceEditStrategy = complexElement.getAttribute(XmlMappingConstants.OPERATION_ATTR_KEY,
                 XmlMappingConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
 
-        return Strings.isNullOrEmpty(perInstanceEditStrategy) ? AttributeConfigElement.create(getNullableDefault(), innerMap) :
-                AttributeConfigElement.create(getNullableDefault(), innerMap, EditStrategyType.valueOf(perInstanceEditStrategy));
+        return Strings.isNullOrEmpty(perInstanceEditStrategy)
+                ? AttributeConfigElement.create(getNullableDefault(), innerMap)
+                : AttributeConfigElement.create(getNullableDefault(), innerMap,
+                        EditStrategyType.valueOf(perInstanceEditStrategy));
     }
-
 }