summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src
diff options
context:
space:
mode:
authorojasdubey <ojas.dubey@amdocs.com>2017-10-16 16:07:29 +0530
committerojasdubey <ojas.dubey@amdocs.com>2017-10-16 17:36:08 +0530
commit92b812ed2e2f5c4da786817754669925c95bf516 (patch)
tree86b1eabe20a5ef9a8031e68aad5246f670f83f16 /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src
parent75e6b8b16cc591bb721527bcaaf1fd99cb64f512 (diff)
Bugfix - Submit failed for existing VSP
Added preventive null checks for onboardingMethod attribute Issue ID: SDC-466 Change-Id: I061b608446b895568724f71ae46c2ef8859cb600 Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
index 0a3428579d..1891cddfd5 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java
@@ -329,7 +329,7 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
validateQuestionnaire(vspDetails.getId(), vspDetails.getVersion(), vspDetails
.getOnboardingMethod()));
- if (vspDetails.getOnboardingMethod().equals("Manual")) {
+ if ("Manual".equals(vspDetails.getOnboardingMethod())) {
Collection<ErrorCode> deploymentFlavourValidationErrList =
deploymentFlavorValidation(vspDetails.getId(), vspDetails.getVersion());
if (validationResponse.getVspErrors() != null) {
@@ -527,7 +527,7 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
if (vspDetails.getSubCategory() == null) {
errors.add(createMissingMandatoryFieldError("sub category"));
}
- if (vspDetails.getOnboardingMethod().equals("Manual")) {
+ if ("Manual".equals(vspDetails.getOnboardingMethod())) {
//Manual Onboarding specific validations
Collection<DeploymentFlavorEntity> deploymentFlavorEntities = vendorSoftwareProductDao
.listDeploymentFlavors(vspDetails.getId(), vspDetails.getVersion());
@@ -729,7 +729,7 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa
mdcDataDebugMessage.debugEntryMessage("VSP id", vspDetails.getId());
VspDetails retrieved = vspInfoDao.get(vspDetails);
- if (!retrieved.getOnboardingMethod().equals(vspDetails.getOnboardingMethod())) {
+ if (!Objects.equals(retrieved.getOnboardingMethod(), vspDetails.getOnboardingMethod())) {
final ErrorCode onboardingMethodUpdateErrorCode = OnboardingMethodErrorBuilder
.getOnboardingUpdateError();