diff options
2 files changed, 17 insertions, 9 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java index 5dff4705af..d9f47f5c3a 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java @@ -1294,15 +1294,23 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { // Resource Property List<ContrailPolicyRef> prlist = new ArrayList<>(); int index = 1; - for (String pf : pFqdns) { - if (!commonUtils.isNullOrEmpty(pf)) { - ContrailPolicyRef pr = new ContrailPolicyRef(); - ContrailPolicyRefSeq refSeq = new ContrailPolicyRefSeq(String.valueOf(index), "0"); - pr.setSeq(refSeq); - index++; - logger.debug("Contrail PolicyRefs Data:{}", pr); - prlist.add(pr); + + if (pFqdns != null) { + for (String pf : pFqdns) { + if (!commonUtils.isNullOrEmpty(pf)) { + ContrailPolicyRef pr = new ContrailPolicyRef(); + ContrailPolicyRefSeq refSeq = new ContrailPolicyRefSeq(String.valueOf(index), "0"); + pr.setSeq(refSeq); + index++; + logger.debug("Contrail PolicyRefs Data:{}", pr); + prlist.add(pr); + } } + } else { + String error = "Null pFqdns at start of mergePolicyRefs"; + logger.error(LoggingAnchor.THREE, MessageEnum.RA_MARSHING_ERROR, ErrorCode.BusinessProcesssError.getValue(), + error); + throw new MsoAdapterException(error); } JsonNode node = null; diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java index b76316bf0e..b2dbd97bfc 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java @@ -60,7 +60,7 @@ public class ExtractPojosForBB { if (gBBInput.getCustomer().getServiceSubscription() == null && gBBInput.getServiceInstance() != null) { result = Optional.of((T) gBBInput.getServiceInstance()); - } else { + } else if (gBBInput.getCustomer().getServiceSubscription() != null) { result = lookupObjectInList( gBBInput.getCustomer().getServiceSubscription().getServiceInstances(), value); } |