- Check name and value in method setToscaPresentationValue
Issue-ID: SDC-2926
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I0d66b29c84139afff92065769bf1b79082959333
}
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);
}