diff options
author | subhash kumar singh <subhash.kumar.singh@huawei.com> | 2019-04-04 16:06:36 +0530 |
---|---|---|
committer | subhash kumar singh <subhash.kumar.singh@huawei.com> | 2019-04-10 20:05:30 +0530 |
commit | 8ac36e5c6b1ddacbcc684af52877ef45caaac07d (patch) | |
tree | 4591e3a5b0d5a379cd3a8dff91eca9ff84a0ce46 /bpmn/MSOCommonBPMN/src/main/java/org | |
parent | b1ddd0226b05ed691036affc67924df397809386 (diff) |
Fix request input parsing if default value null
Fix request input parsing if default value null.
Change-Id: I5d3e2e55d630271f93773eb7c634f50af4197fb0
Issue-ID: SO-1744
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java/org')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java index e7ab6e4606..0dbf2c2a75 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java @@ -139,7 +139,6 @@ public class ResourceRequestBuilder { Map<String, Object> serviceInputs) { try { Map<String, Object> serviceInstnace = getServiceInstnace(serviceUuid); - // find match of customization uuid in vnf Map<String, Map<String, Object>> serviceResources = (Map<String, Map<String, Object>>) serviceInstnace.get("serviceResources"); @@ -200,7 +199,11 @@ public class ResourceRequestBuilder { if (serviceInputs.containsKey(tmpKey)) { value = (String) serviceInputs.get(tmpKey); } else { - value = split[1]; + if (split.length == 1) { // means value is empty e.g. "a":"key1|" + value = ""; + } else { + value = split[1]; + } } } resourceInput.put(key, value); |