aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-07-08 15:26:41 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-08 15:26:41 +0000
commit82e8c3800e2ef4d27353b9085b45b963c51b5a9b (patch)
tree27df58c3cbe762750ee942d46aa09d36489d0c2c
parentf83362f93e7a88c34b85048aaf2e1f14c611800f (diff)
parent0d956865ed0ac3d18eea774db93f81a6d7d26dd9 (diff)
Merge "Added null check to prevent call of getVnfResources() method for null vf object"
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index a141f59153..1d73bf21c9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -843,8 +843,10 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
// Add version check
// First - see if it's in the VnfResource record
// if we have a vf Module - then we have to query to get the VnfResource record.
- if (!oldWay && vf.getVnfResources() != null) {
- vnfResource = vf.getVnfResources();
+ if (!oldWay) {
+ if (vf != null) {
+ vnfResource = vf.getVnfResources();
+ }
if (vnfResource == null) {
logger.debug("Unable to find vnfResource will not error for now...");
}