diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java')
1 files changed, 30 insertions, 32 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java index d78e48bff8..c0b1be61bf 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,49 +17,47 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen; import com.amdocs.zusammen.adaptor.inbound.api.types.item.ZusammenElement; -import org.apache.commons.io.IOUtils; - import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.Objects; +import org.apache.commons.io.IOUtils; class VspZusammenUtil { - private VspZusammenUtil(){} + private VspZusammenUtil() { + } - static ZusammenElement aggregateElements(ZusammenElement... elements) { - ZusammenElement head = null; - ZusammenElement father = null; - for (ZusammenElement element : elements) { - if (Objects.isNull(head)) { - head = father = element; - } else { - if (father != null) { - father.getSubElements().add(element); - father = element; + static ZusammenElement aggregateElements(ZusammenElement... elements) { + ZusammenElement head = null; + ZusammenElement father = null; + for (ZusammenElement element : elements) { + if (Objects.isNull(head)) { + head = father = element; + } else { + if (father != null) { + father.getSubElements().add(element); + father = element; + } + } } - } + return head; } - return head; - } - - static boolean hasEmptyData(InputStream elementData) { - String EMPTY_DATA = "{}"; - byte[] byteElementData; - try { - byteElementData = IOUtils.toByteArray(elementData); - } catch (IOException ex) { - return false; - } - if (Arrays.equals(EMPTY_DATA.getBytes(), byteElementData)) { - return true; + static boolean hasEmptyData(InputStream elementData) { + String EMPTY_DATA = "{}"; + byte[] byteElementData; + try { + byteElementData = IOUtils.toByteArray(elementData); + } catch (IOException ex) { + return false; + } + if (Arrays.equals(EMPTY_DATA.getBytes(), byteElementData)) { + return true; + } + return false; } - return false; - } } |