From 939caf126117d3d3338d38a76c2e67eabaff3bc0 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Mon, 26 Feb 2018 20:58:16 -0500 Subject: Make use of getOrDefault Change-Id: Ic73b58835a7964cb2fd88415f55b03ff79ad33ff Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- .../src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'adapters/mso-adapter-utils/src/main/java/org') diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java index 600985e310..506b62994d 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java @@ -67,10 +67,8 @@ public class StackInfo { if (stack.getStackStatus() == null) { this.status = HeatStatus.INIT; - } else if (heatStatusMap.containsKey(stack.getStackStatus())) { - this.status = heatStatusMap.get(stack.getStackStatus()); } else { - this.status = HeatStatus.UNKNOWN; + this.status = heatStatusMap.getOrDefault(stack.getStackStatus(), HeatStatus.UNKNOWN); } if (stack.getOutputs() != null) { this.outputs = new HashMap<>(); -- cgit 1.2.3-korg