diff options
author | Steve Smokowski <ss835w@att.com> | 2019-05-09 12:30:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-09 12:30:27 +0000 |
commit | fb5a7ef7ff903373800b44e3c219e49a3b532b27 (patch) | |
tree | 147a85849ab2ee42d3b182736c57c36372b058fb | |
parent | 0b06cfe120e4561143af82c6a0fcd07a6cb9d130 (diff) | |
parent | 341505c1c54ba16fd3d3a5b5cfe6891f8cd76842 (diff) |
Merge "Removed null checks from ResourceRequestBuilder"
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java | 8 |
1 files changed, 4 insertions, 4 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 0df25be714..8aab4ec818 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 @@ -151,13 +151,13 @@ public class ResourceRequestBuilder { Map<String, String> resourceInputData = getResourceInputStr(serviceVnfCust, resourceCustomizationUuid); // find match in network resource - if (resourceInputData != null && resourceInputData.isEmpty()) { + if (resourceInputData.isEmpty()) { List<Map<String, Object>> serviceNetworkCust = (List<Map<String, Object>>) serviceResources.get("serviceNetworks"); resourceInputData = getResourceInputStr(serviceNetworkCust, resourceCustomizationUuid); // find match in AR resource - if (resourceInputData == null) { + if (resourceInputData.isEmpty()) { List<Map<String, Object>> serviceArCust = (List<Map<String, Object>>) serviceResources.get("serviceAllottedResources"); resourceInputData = getResourceInputStr(serviceArCust, resourceCustomizationUuid); @@ -166,7 +166,7 @@ public class ResourceRequestBuilder { String resourceInputStr = null; ResourceLevel resourceLevel = null; - if (resourceInputData != null) { + if (!resourceInputData.isEmpty()) { resourceInputStr = resourceInputData.get("resourceInput"); resourceLevel = ResourceLevel.valueOf(resourceInputData.get("nodeType")); } @@ -200,7 +200,7 @@ public class ResourceRequestBuilder { return resourceInputMap; } } - return null; + return new HashMap<>(); } // this method combines resource input with service input |