diff options
Diffstat (limited to 'common-be/src/main/java/org')
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/datatypes/tosca/ToscaDataDefinition.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/tosca/ToscaDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/tosca/ToscaDataDefinition.java index ee985d3fa1..4637231de6 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/tosca/ToscaDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/tosca/ToscaDataDefinition.java @@ -54,10 +54,12 @@ public abstract class ToscaDataDefinition { } public void setToscaPresentationValue(JsonPresentationFields name, Object value) { - if (toscaPresentation == null && value != null) { - toscaPresentation = new HashMap<>(); + if(name !=null) { + if (toscaPresentation == null) { + toscaPresentation = new HashMap<>(); + } + toscaPresentation.put(name.getPresentation(), value); } - toscaPresentation.put(name.getPresentation(), value); } |