aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorMunir Ahmad <munir.ahmad@bell.ca>2018-03-02 19:36:58 -0500
committerMunir Ahmad <munir.ahmad@bell.ca>2018-03-02 19:36:58 -0500
commit51343e00c0c435d71d55a747ed15ebe75fa63371 (patch)
treeb460a44656cc6adfb21a32afd1b2530df2906713 /bpmn
parent51b81849198a97f716f810dd8183ff276304d2ba (diff)
Make use of Map.getOrDefault
Change-Id: Ifcd5c9b79179ee9ffd6705990bd4b1991034fb48 Issue-ID: SO-437 Signed-off-by: Munir Ahmad <munir.ahmad@bell.ca>
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java8
1 files changed, 2 insertions, 6 deletions
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..b65034432d 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
@@ -54,12 +54,8 @@ public class RollbackData implements Serializable {
* @param value the value
*/
public void put(String type, String key, String value) {
- Map<String, Serializable> mapForType = dictionary.get(type);
-
- if (mapForType == null) {
- mapForType = new HashMap<String, Serializable>();
- dictionary.put(type, mapForType);
- }
+ Map<String, Serializable> mapForType = dictionary
+ .computeIfAbsent(type, k -> new HashMap<String, Serializable>());
mapForType.put(key, value);
}