Unsupported operation exception handling
[netvirt.git] / fibmanager / impl / src / main / java / org / opendaylight / netvirt / fibmanager / VrfEntryListener.java
index 053ce59c33510563aacde4731331943370ea055c..7d6896e3a6b4ed16c5c3c768c3967a15255354fe 100644 (file)
@@ -990,7 +990,7 @@ public class VrfEntryListener extends AsyncDataTreeChangeListenerBase<VrfEntry,
             .child(LabelRouteInfo.class, new LabelRouteInfoKey(lri.getLabel())).build();
 
         List<String> vpnInstancesList = lri.getVpnInstanceList() != null
-            ? lri.getVpnInstanceList() : new ArrayList<>();
+            ? new ArrayList<>(lri.getVpnInstanceList()) : new ArrayList<>();
         if (vpnInstancesList.contains(vpnInstanceName)) {
             LOG.debug("vpninstance {} name is present", vpnInstanceName);
             vpnInstancesList.remove(vpnInstanceName);
@@ -1039,7 +1039,7 @@ public class VrfEntryListener extends AsyncDataTreeChangeListenerBase<VrfEntry,
             MDSALUtil.buildFlowEntity(destDpId, NwConstants.INTERNAL_TUNNEL_TABLE,
             getTableMissFlowRef(destDpId, NwConstants.INTERNAL_TUNNEL_TABLE, label),
                     FibConstants.DEFAULT_VPN_INTERNAL_TUNNEL_TABLE_PRIORITY,
-                    String.format("%s:%d", "TST Flow Entry ", label), 0, 0,
+                    String.format("%s:%s", "TST Flow Entry ", label), 0, 0,
                     Uint64.valueOf(COOKIE_TUNNEL.longValue() + label.longValue()),
                     mkMatches, mkInstructions);
 
@@ -1065,7 +1065,7 @@ public class VrfEntryListener extends AsyncDataTreeChangeListenerBase<VrfEntry,
             NwConstants.INTERNAL_TUNNEL_TABLE,
             getTableMissFlowRef(dpId, NwConstants.INTERNAL_TUNNEL_TABLE, label),
                 FibConstants.DEFAULT_VPN_INTERNAL_TUNNEL_TABLE_PRIORITY,
-                String.format("%s:%d", "TST Flow Entry ", label), 0, 0,
+                String.format("%s:%s", "TST Flow Entry ", label), 0, 0,
                 Uint64.valueOf(COOKIE_TUNNEL.longValue() + label.longValue()), mkMatches, null);
         Node nodeDpn = FibUtil.buildDpnNode(flowEntity.getDpnId());
         FlowKey flowKey = new FlowKey(new FlowId(flowEntity.getFlowId()));