BUG 5057 bgpvpn-create fails with IOBE
[vpnservice.git] / neutronvpn / neutronvpn-impl / src / main / java / org / opendaylight / vpnservice / neutronvpn / NeutronBgpvpnChangeListener.java
index d413a32117290ec24c033456b7e2bf0c1ff4d552..dada11d21f9a4cf7d31ae385046e484cc99307f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -94,7 +94,7 @@ public class NeutronBgpvpnChangeListener extends AbstractDataChangeListener<Bgpv
             // generate new RD
         }
         Uuid router = null;
-        if (input.getRouters() != null) {
+        if (input.getRouters() != null && !input.getRouters().isEmpty()) {
             // currently only one router
             router = input.getRouters().get(0);
         }