From 0f3a80869bf57fc909ec5908601ba04271d92d97 Mon Sep 17 00:00:00 2001 From: shrikantawachar Date: Tue, 13 Mar 2018 18:58:28 +0530 Subject: Processing CSAR failed The *.csar packages not passing onboarding during SDC sanity. Change-Id: I0fc57296bad85928c704dd1b18a7e60a996c13a9 Issue-ID: SDC-1124 Signed-off-by: shrikantawachar --- .../impl/OrchestrationTemplateCandidateManagerImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src') diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImpl.java index cfb4c9dbfd..9d36ad452b 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImpl.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImpl.java @@ -25,8 +25,6 @@ import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.utils.CommonUtil; import org.openecomp.sdc.common.utils.SdcCommon; import org.openecomp.sdc.datatypes.error.ErrorMessage; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.logging.api.annotations.Metrics; import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManager; import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao; @@ -48,12 +46,12 @@ import java.io.InputStream; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; public class OrchestrationTemplateCandidateManagerImpl implements OrchestrationTemplateCandidateManager { - private static final Logger LOGGER = - LoggerFactory.getLogger(OrchestrationTemplateCandidateManagerImpl.class); + private final VendorSoftwareProductInfoDao vspInfoDao; private final CandidateService candidateService; @@ -126,6 +124,11 @@ public class OrchestrationTemplateCandidateManagerImpl if (!candidateDataEntity.isPresent()) { return Optional.empty(); } + + if(Objects.isNull(candidateDataEntity.get().getFileSuffix())) { + return Optional.empty(); + } + OnboardingTypesEnum type = OnboardingTypesEnum.getOnboardingTypesEnum(candidateDataEntity.get().getFileSuffix()); -- cgit 1.2.3-korg