summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin, Max <max.benjamin@att.com>2020-07-07 10:41:51 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-07-07 10:41:51 -0400
commit1913b4f99c6bdd069de0aff2ebbe6c663ccc14ec (patch)
treeb070c0c26e16436d81bfe775bf3d9e7fd7d80fab
parentaf108bdcc19cdc2cf06dacdd0705ec408bfd4910 (diff)
add additional null check to prevent exceptions
add additional null check to prevent exceptions in logs Issue-ID: SO-3031 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I9d338e68db9e2cfff5d0086a107b5d7bdd4bd703
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
index 5a52e3a49d..4206596c94 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
@@ -104,7 +104,7 @@ public class ExecuteBuildingBlockRainyDay {
handlingCode = "Abort";
} else {
try {
- if (gBBInput.getCustomer().getServiceSubscription() != null) {
+ if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) {
serviceType = gBBInput.getCustomer().getServiceSubscription().getServiceInstances().get(0)
.getModelInfoServiceInstance().getServiceType();
}
@@ -119,7 +119,7 @@ public class ExecuteBuildingBlockRainyDay {
String vnfType = ASTERISK;
String vnfName = ASTERISK;
try {
- if (gBBInput.getCustomer().getServiceSubscription() != null) {
+ if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) {
for (GenericVnf vnf : gBBInput.getCustomer().getServiceSubscription().getServiceInstances()
.get(0).getVnfs()) {
if (vnf.getVnfId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID))) {
@@ -173,7 +173,7 @@ public class ExecuteBuildingBlockRainyDay {
String serviceRole = ASTERISK;
try {
- if (gBBInput.getCustomer().getServiceSubscription() != null) {
+ if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) {
serviceRole = gBBInput.getCustomer().getServiceSubscription().getServiceInstances().get(0)
.getModelInfoServiceInstance().getServiceRole();
}