diff options
author | Steve Smokowski <ss835w@att.com> | 2018-12-12 12:42:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-12-12 12:42:16 +0000 |
commit | f0671bb40cad5360e1bd3f53d29c16b1516513e5 (patch) | |
tree | 1aa622031b0ad9e92ea0b45e31e638d4398e3746 /adapters/mso-catalog-db-adapter/src/main | |
parent | 0666ed9a220795001894cb366129e0c4231bd9c1 (diff) | |
parent | f433847c5e9b3f49b8c3f109f75de20ad5e995d5 (diff) |
Merge "Added check for nullpointer exception"
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main')
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java index 8c323af71b..70f53133dd 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java @@ -587,8 +587,9 @@ public class CatalogDbAdapterRest { if (null == recipe) { NetworkResource nResource = networkResourceRepo.findResourceByModelUUID(rmUuid); - recipe = networkRecipeRepo.findFirstByModelNameAndActionAndVersionStr(nResource.getModelName(), action, vnf.getModelVersion()); - + if(null!=vnf) { + recipe = networkRecipeRepo.findFirstByModelNameAndActionAndVersionStr(nResource.getModelName(), action, vnf.getModelVersion()); + } // for network fetch the default recipe if (recipe == null) { recipe = networkRecipeRepo.findFirstByModelNameAndAction("SDNC_DEFAULT", action); |