From: sindhu3672 Date: Fri, 9 Aug 2019 17:09:55 +0000 (+0530) Subject: Replace collections size with isEmpty X-Git-Tag: 1.5.2~104^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F93235%2F1;p=so.git Replace collections size with isEmpty Replace collections size with isEmpty mso-adapter-utils class Issue-ID: SO-2187 Signed-off-by: sindhu3672 Change-Id: Icf6fc86d9d6f02571938804d214b5b5bfca72698 --- diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java index 8cacf8526a..468b771c07 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java @@ -132,14 +132,14 @@ public class MsoHeatEnvironmentEntry { } public boolean hasResources() { - if (this.resources != null && this.resources.size() > 0) { + if (this.resources != null && !this.resources.isEmpty()) { return true; } return false; } public boolean hasParameters() { - if (this.parameters != null && this.parameters.size() > 0) { + if (this.parameters != null && !this.parameters.isEmpty()) { return true; } return false; @@ -147,7 +147,7 @@ public class MsoHeatEnvironmentEntry { public boolean containsParameter(String paramName) { boolean contains = false; - if (this.parameters == null || this.parameters.size() < 1) { + if (this.parameters == null || this.parameters.isEmpty()) { return false; } if (this.parameters.contains(new MsoHeatEnvironmentParameter(paramName))) {