summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils
diff options
context:
space:
mode:
authorMunir Ahmad <munir.ahmad@bell.ca>2018-02-26 20:58:16 -0500
committerMunir Ahmad <munir.ahmad@bell.ca>2018-02-26 20:58:16 -0500
commit939caf126117d3d3338d38a76c2e67eabaff3bc0 (patch)
treea7a432c429d71dde1ef78f51824086962e9e107e /adapters/mso-adapter-utils
parent250de788c5cf40cc8a73c7aad4dc2f482f821768 (diff)
Make use of getOrDefault
Change-Id: Ic73b58835a7964cb2fd88415f55b03ff79ad33ff Issue-ID: SO-437 Signed-off-by: Munir Ahmad <munir.ahmad@bell.ca>
Diffstat (limited to 'adapters/mso-adapter-utils')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/StackInfo.java4
1 files changed, 1 insertions, 3 deletions
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<>();