X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bpmn%2FMSOCoreBPMN%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fmso%2Fbpmn%2Fcore%2FRollbackData.java;h=f49712ee8bed5a012768b31a0af4082538b8dbb4;hb=b6dc38501f3b746426b42d9de4cc883d894149e8;hp=64068d2b9007c503876fa3e2b05f367dbfa0613e;hpb=b5df7eca046a31b96b21413b4d83f472f4a08088;p=so.git diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java index 64068d2b90..f49712ee8b 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java @@ -35,7 +35,7 @@ public class RollbackData implements Serializable { private static final long serialVersionUID = 1L; private Map> dictionary = - new HashMap>(); + new HashMap<>(); /** * Returns true if the specified type is stored in this object. @@ -54,12 +54,8 @@ public class RollbackData implements Serializable { * @param value the value */ public void put(String type, String key, String value) { - Map mapForType = dictionary.get(type); - - if (mapForType == null) { - mapForType = new HashMap(); - dictionary.put(type, mapForType); - } + Map mapForType = dictionary + .computeIfAbsent(type, k -> new HashMap<>()); mapForType.put(key, value); }