From 8ac36e5c6b1ddacbcc684af52877ef45caaac07d Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Thu, 4 Apr 2019 16:06:36 +0530 Subject: 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 --- .../org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/main') 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 serviceInputs) { try { Map serviceInstnace = getServiceInstnace(serviceUuid); - // find match of customization uuid in vnf Map> serviceResources = (Map>) 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); -- cgit 1.2.3-korg