X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager-facade-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Ffacade%2Fxml%2Fmapping%2Fattributes%2Ffromxml%2FCompositeAttributeReadingStrategy.java;fp=opendaylight%2Fconfig%2Fconfig-manager-facade-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Ffacade%2Fxml%2Fmapping%2Fattributes%2Ffromxml%2FCompositeAttributeReadingStrategy.java;h=f35281411ab008a8e2664061133cbceee9b0ddd0;hb=d266f4384d4850af9049d7cddd2bbac8f75ba61e;hp=461ac339e9782cb8804ba0d1037e997e74bc2b2a;hpb=b197d75e803beac663033287d769dce62c108490;p=controller.git diff --git a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/fromxml/CompositeAttributeReadingStrategy.java b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/fromxml/CompositeAttributeReadingStrategy.java index 461ac339e9..f35281411a 100644 --- a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/fromxml/CompositeAttributeReadingStrategy.java +++ b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/fromxml/CompositeAttributeReadingStrategy.java @@ -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, @@ -41,14 +41,13 @@ public class CompositeAttributeReadingStrategy extends AbstractAttributeReadingS List recognisedChildren = Lists.newArrayList(); for (Entry innerAttrEntry : innerStrategies.entrySet()) { - List childItem = complexElement.getChildElementsWithSameNamespace( - innerAttrEntry.getKey()); + List 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)); } - }