aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorr.bogacki <r.bogacki@samsung.com>2019-05-07 08:22:38 +0200
committerr.bogacki <r.bogacki@samsung.com>2019-05-07 08:23:43 +0200
commit341505c1c54ba16fd3d3a5b5cfe6891f8cd76842 (patch)
tree88d45e90cc08ec28741bfd2ee0a91ac3484b0955 /bpmn
parent7af16eec7a5ea196de57b47b918d3d88390a715c (diff)
Removed null checks from ResourceRequestBuilder
Removed unnecessary null checks from ResourceRequestBuilder according to comments from https://gerrit.onap.org/r/#/c/87001/ Change-Id: I21140d812982713229c322d772e6a10f7c7c044d Issue-ID: SO-1498 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java8
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