Do not unbox Boolean
[netvirt.git] / vpnmanager / impl / src / main / java / org / opendaylight / netvirt / vpnmanager / VpnInterfaceManager.java
index cd9d2c0b85dfe01504ae34855b387d7da044b173..1350a29be4fa542a7501c6beb34ad5afdde495c2 100755 (executable)
@@ -1568,13 +1568,13 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
     private boolean handleVpnInstanceUpdateForVpnInterface(InstanceIdentifier<VpnInterface> identifier,
                                                            VpnInterface original, VpnInterface update,
                                                            List<ListenableFuture<Void>> futures) {
-        boolean isVpnInstanceUpdate = Boolean.FALSE;
+        boolean isVpnInstanceUpdate = false;
         final VpnInterfaceKey key = identifier.firstKeyOf(VpnInterface.class);
         final String interfaceName = key.getName();
-        List<String> oldVpnList = vpnUtil.getVpnListForVpnInterface(original);
+        List<String> oldVpnList = VpnUtil.getVpnListForVpnInterface(original);
         List<String> oldVpnListCopy = new ArrayList<>();
         oldVpnListCopy.addAll(oldVpnList);
-        List<String> newVpnList = vpnUtil.getVpnListForVpnInterface(update);
+        List<String> newVpnList = VpnUtil.getVpnListForVpnInterface(update);
         List<String> newVpnListCopy = new ArrayList<>();
         newVpnListCopy.addAll(newVpnList);
 
@@ -1620,8 +1620,8 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
              *
              *
              */
-            isVpnInstanceUpdate = Boolean.TRUE;
-            if (vpnUtil.isDualRouterVpnUpdate(oldVpnListCopy, newVpnListCopy)) {
+            isVpnInstanceUpdate = true;
+            if (VpnUtil.isDualRouterVpnUpdate(oldVpnListCopy, newVpnListCopy)) {
                 if ((oldVpnListCopy.size() == 2 || oldVpnListCopy.size() == 3)
                         && (oldVpnList.size() == 1 && newVpnList.size() == 0)) {
                     //Identify the external BGP-VPN Instance and pass that value as newVpnList
@@ -2135,11 +2135,6 @@ public class VpnInterfaceManager extends AsyncDataTreeChangeListenerBase<VpnInte
     }
 
     private void processSavedInterface(UnprocessedVpnInterfaceData intefaceData, String vpnName) {
-        if (!canHandleNewVpnInterface(intefaceData.identifier, intefaceData.vpnInterface, vpnName)) {
-            LOG.error("add: VpnInstance {} for vpnInterface {} not ready, holding on ",
-                  vpnName, intefaceData.vpnInterface.getName());
-            return;
-        }
         final VpnInterfaceKey key = intefaceData.identifier.firstKeyOf(VpnInterface.class);
         final String interfaceName = key.getName();
         InstanceIdentifier<VpnInterfaceOpDataEntry> vpnInterfaceOpIdentifier = VpnUtil