diff options
author | 2018-01-04 18:52:19 +0530 | |
---|---|---|
committer | 2018-01-07 10:42:49 +0000 | |
commit | a3d6343980633633f8ed144a20a2460277c98b83 (patch) | |
tree | 98e5290568f617ed849ccf66e663c8d7e35bf79e /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp | |
parent | 9636aa63a9a61a7e1354b268d3201f8a31638f34 (diff) |
Fix issue Null pointer exception
If feature group list is empty or null we should ignore check.
Change-Id: I6fcf20501353f6f32ad166a6096074f4f393dd00
Issue-ID: SDC-876
Signed-off-by: amitjai <amitjai@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp')
-rw-r--r-- | openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/DeploymentFlavorManagerImpl.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/DeploymentFlavorManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/DeploymentFlavorManagerImpl.java index 3f3d305f19..14c5044984 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/DeploymentFlavorManagerImpl.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/DeploymentFlavorManagerImpl.java @@ -106,8 +106,8 @@ public class DeploymentFlavorManagerImpl implements DeploymentFlavorManager { getFeatureGroupListForVsp(deploymentFlavorEntity.getVspId(), version); String featureGroup = deploymentFlavorEntity.getDeploymentFlavorCompositionData() .getFeatureGroupId(); - if (featureGroup != null && featureGroup.trim().length() > 0 - && isEmpty(featureGroups) || (!(validFeatureGroup(featureGroups, featureGroup)))) { + if (featureGroup != null && featureGroup.trim().length() > 0 + && (isEmpty(featureGroups) || (!(validFeatureGroup(featureGroups, featureGroup))))) { ErrorCode deploymentFlavorErrorBuilder = DeploymentFlavorErrorBuilder .getFeatureGroupNotexistErrorBuilder(featureGroup, deploymentFlavorEntity.getVspId(), version); @@ -115,8 +115,7 @@ public class DeploymentFlavorManagerImpl implements DeploymentFlavorManager { LoggerTragetServiceName.CREATE_DEPLOYMENT_FLAVOR, ErrorLevel.ERROR.name(), LoggerErrorCode.DATA_ERROR.getErrorCode(), deploymentFlavorErrorBuilder.message()); throw new CoreException(deploymentFlavorErrorBuilder); - } - + } validateComponentComputeAssociation(deploymentFlavorEntity, version); } |