diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2019-08-02 06:56:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-02 06:56:19 +0000 |
commit | 96bc763ae2ee6264d7a455ac09030e60a6a05357 (patch) | |
tree | 89bf26d8952f2087f621eecb534fcd8de5603ad1 /bpmn/mso-infrastructure-bpmn | |
parent | 18bcc4e72e339aa3fb584da7799e0071151b47c2 (diff) | |
parent | 8757d3879ccfc4b5dddeda372b520d380639ef58 (diff) |
Merge "Added null check for injectedVariables to prevent crash at call of injectedVariables.get()"
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn')
-rw-r--r-- | bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java index 389f931901..e71404a2ff 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java @@ -350,10 +350,12 @@ public abstract class WorkflowTest { */ try { - msoRequestId = (String) injectedVariables.get("requestId"); - variables.put("mso-request-id", msoRequestId); - msoServiceInstanceId = (String) injectedVariables.get("serviceInstanceId"); - variables.put("mso-service-instance-id", msoServiceInstanceId); + if (injectedVariables != null) { + msoRequestId = (String) injectedVariables.get("requestId"); + variables.put("mso-request-id", msoRequestId); + msoServiceInstanceId = (String) injectedVariables.get("serviceInstanceId"); + variables.put("mso-service-instance-id", msoServiceInstanceId); + } } catch (Exception e) { } if (msoRequestId == null || msoRequestId.trim().equals("")) { |