From fa7e2144bb006c86bfe43f8e3b734ffa5ad99707 Mon Sep 17 00:00:00 2001 From: sindhu3672 Date: Mon, 12 Aug 2019 11:10:32 +0530 Subject: Change collections size with isEmpty Change collections size with isEmpty mso-adapter-utils class Issue-ID: SO-2187 Signed-off-by: sindhu3672 Change-Id: I784a5839d003c42a9880287d304060cd9639f1b6 --- .../src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'adapters/mso-adapter-utils/src/main/java/org/onap') 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 segments = new ArrayList<>(vlans.size()); for (int vlan : vlans) { Segment segment = new Segment(); -- cgit 1.2.3-korg