Bug 5315 - NPE while creating Neutron Router w/o interface attached to it
[vpnservice.git] / neutronvpn / neutronvpn-impl / src / main / java / org / opendaylight / vpnservice / neutronvpn / NeutronvpnUtils.java
index d7adab8b6ba177c21eeff4e82cc76534f2d901b0..b23120e4508aa645fb2e1b5994f5cec75b1cce0d 100644 (file)
@@ -220,7 +220,7 @@ public class NeutronvpnUtils {
         if (router != null) {
             List<org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l3.rev150712.routers.attributes.routers.router
                     .Interfaces> interfacesList = router.getInterfaces();
-            if (!interfacesList.isEmpty()) {
+            if (interfacesList != null) {
                 for (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l3.rev150712.routers.attributes.routers
                         .router.Interfaces interfaces : interfacesList) {
                     subnetIdList.add(interfaces.getSubnetId());