diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-23 10:26:54 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-23 10:27:14 -0400 |
commit | 70252f03c8c2b3e7ae17ea9963d20a93370390e2 (patch) | |
tree | 102c2f9d8a2c0f40ad409be40ed34811e493c6f6 /mso-catalog-db/src/main/java/org | |
parent | 7c0489bd1585b1a3fb97248397eccd72ee644e82 (diff) |
Fix a NullPointerException on getting no data from
Fix a NullPointerException on getting no data from the Catalog DB.
Change-Id: Ibeb7206f2427104623943f964afff377ca666d28
Issue-ID: SO-1695
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-catalog-db/src/main/java/org')
-rw-r--r-- | mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java index 2faac31f2d..3e35e78e7a 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java @@ -808,10 +808,12 @@ public class CatalogDbClient { public VnfVfmoduleCvnfcConfigurationCustomization getVnfVfmoduleCvnfcConfigurationCustomizationByVnfCustomizationUuidAndVfModuleCustomizationUuidAndCvnfcCustomizationUuid( String vnfCustomizationUuid, String vfModuleCustomizationUuid, String cvnfcCustomizationUuid) { CvnfcCustomization cvnfc = getCvnfcCustomizationByCustomizationUUID(cvnfcCustomizationUuid); - for(VnfVfmoduleCvnfcConfigurationCustomization vnfVfModuleCvnfcCust: cvnfc.getVnfVfmoduleCvnfcConfigurationCustomization()){ - if(vnfVfModuleCvnfcCust.getVnfResourceCustomization().getModelCustomizationUUID().equals(vnfCustomizationUuid) && + if (cvnfc != null) { + for(VnfVfmoduleCvnfcConfigurationCustomization vnfVfModuleCvnfcCust: cvnfc.getVnfVfmoduleCvnfcConfigurationCustomization()){ + if(vnfVfModuleCvnfcCust.getVnfResourceCustomization().getModelCustomizationUUID().equals(vnfCustomizationUuid) && vnfVfModuleCvnfcCust.getVfModuleCustomization().getModelCustomizationUUID().equals(vfModuleCustomizationUuid)){ return vnfVfModuleCvnfcCust; + } } } return null; |