diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib')
2 files changed, 1 insertions, 15 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/OrchestrationTemplateCandidateDaoZusammenImpl.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/OrchestrationTemplateCandidateDaoZusammenImpl.java index b72d684065..22fe1dd98c 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/OrchestrationTemplateCandidateDaoZusammenImpl.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/OrchestrationTemplateCandidateDaoZusammenImpl.java @@ -72,7 +72,7 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl zusammenAdaptor.getElementByName(context, elementContext, null, ElementType.OrchestrationTemplateCandidate.name()); if (candidateElement.isPresent()) { - if (VspZusammenUtil.isEmpty(candidateElement.get().getData())) { + if (VspZusammenUtil.hasEmptyData(candidateElement.get().getData())) { return null; } OrchestrationTemplateCandidateData candidateData = new OrchestrationTemplateCandidateData(); 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 09fd948030..da2232450a 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 @@ -2,7 +2,6 @@ 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 org.apache.commons.lang.ArrayUtils; import java.io.IOException; import java.io.InputStream; @@ -30,19 +29,6 @@ class VspZusammenUtil { return head; } - static boolean isEmpty(InputStream elementData) { - byte[] byteElementData; - if (Objects.isNull(elementData)) { - return true; - } - try { - byteElementData = IOUtils.toByteArray(elementData); - } catch (IOException e) { - return false; - } - return ArrayUtils.isEmpty(byteElementData); - } - static boolean hasEmptyData(InputStream elementData) { String EMPTY_DATA = "{}"; byte[] byteElementData; |