aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
authorshikha0203 <shivani.khare@est.tech>2023-02-22 15:48:48 +0000
committerMichael Morris <michael.morris@est.tech>2023-02-27 15:40:33 +0000
commitd1565b3fb250c084c86d4fb8a7b96f40f2cd23f9 (patch)
tree8fa24f81069354378c12bc93b6e9fce166921064 /openecomp-be
parenteff67d136fedf031fe89e1199407084e434ce00b (diff)
TranslationService- Add null test before using nullable values
Issue-ID: SDC-4414 Signed-off-by: shikha0203 <shivani.khare@est.tech> Change-Id: I7b80df4c650af677fb194d04dc6013adff08473b
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java
index 97b572235c..bf37d9b420 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/TranslationService.java
@@ -155,15 +155,15 @@ public class TranslationService {
public void translateHelmFile(ServiceTemplate serviceTemplate, FileData heatFileData, TranslationContext context) {
String heatFileName = heatFileData.getFile();
Map<String, ParameterDefinition> inputs = serviceTemplate.getTopology_template().getInputs();
- if (!Objects.isNull(inputs)) {
+ if (Objects.nonNull(inputs)) {
inputs.entrySet().forEach(stringParameterDefinitionEntry -> {
List inputParamVFModuleList = getVFModulesList(inputs.get(stringParameterDefinitionEntry.getKey()));
if (!inputParamVFModuleList.contains(FileUtils.getFileWithoutExtention(heatFileName))) {
inputParamVFModuleList.add(FileUtils.getFileWithoutExtention(heatFileName));
}
});
+ inputs.putAll(inputs);
}
- inputs.putAll(inputs);
}
private void handleHeatPseudoParam(String heatFileName, ServiceTemplate serviceTemplate, TranslationContext context) {