X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager-facade-xml%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Ffacade%2Fxml%2Fmapping%2Fattributes%2Fmapping%2FArrayAttributeMappingStrategy.java;h=9aa5a6a9148dd9aafb13dc651ed4f91d77721481;hp=0c593ebf3d59bf7aaad73b0a4775610b98697455;hb=d266f4384d4850af9049d7cddd2bbac8f75ba61e;hpb=b197d75e803beac663033287d769dce62c108490 diff --git a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/mapping/ArrayAttributeMappingStrategy.java b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/mapping/ArrayAttributeMappingStrategy.java index 0c593ebf3d..9aa5a6a914 100644 --- a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/mapping/ArrayAttributeMappingStrategy.java +++ b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/mapping/ArrayAttributeMappingStrategy.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, @@ -28,7 +28,7 @@ public class ArrayAttributeMappingStrategy extends AbstractAttributeMappingStrat @Override public Optional> mapAttribute(final Object value) { - if (value == null){ + if (value == null) { return Optional.absent(); } @@ -40,12 +40,10 @@ public class ArrayAttributeMappingStrategy extends AbstractAttributeMappingStrat Object innerValue = Array.get(value, i); Optional mapAttribute = innerElementStrategy.mapAttribute(innerValue); - if (mapAttribute.isPresent()){ + if (mapAttribute.isPresent()) { retVal.add(mapAttribute.get()); } } - return Optional.of(retVal); } - }