aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main/java
diff options
context:
space:
mode:
authorsindhu3672 <arcot.sindhuri@huawei.com>2019-08-12 11:10:32 +0530
committersindhu3672 <arcot.sindhuri@huawei.com>2019-08-12 11:10:32 +0530
commitfa7e2144bb006c86bfe43f8e3b734ffa5ad99707 (patch)
tree0dfc5273fe735253976e99302f3d492fdd5c8c26 /adapters/mso-adapter-utils/src/main/java
parent3081381bb2ba253fc0aa34203c90ea8bf63b26b4 (diff)
Change collections size with isEmpty
Change collections size with isEmpty mso-adapter-utils class Issue-ID: SO-2187 Signed-off-by: sindhu3672 <arcot.sindhuri@huawei.com> Change-Id: I784a5839d003c42a9880287d304060cd9639f1b6
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
index 069c6c7c5b..44fc620b07 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
@@ -130,13 +130,13 @@ public class MsoNeutronUtils extends MsoCommonUtils {
network.setAdminStateUp(true);
if (type == NetworkType.PROVIDER) {
- if (provider != null && vlans != null && vlans.size() > 0) {
+ if (provider != null && vlans != null && !vlans.isEmpty()) {
network.setProviderPhysicalNetwork(provider);
network.setProviderNetworkType("vlan");
network.setProviderSegmentationId(vlans.get(0));
}
} else if (type == NetworkType.MULTI_PROVIDER) {
- if (provider != null && vlans != null && vlans.size() > 0) {
+ if (provider != null && vlans != null && !vlans.isEmpty()) {
List<Segment> segments = new ArrayList<>(vlans.size());
for (int vlan : vlans) {
Segment segment = new Segment();