This method does not touch any state, make it static and update
its sole caller.
Change-Id: I52211fc3f3636ffe0d3cfac2ce024f39364b614e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
*
*/
isVpnInstanceUpdate = Boolean.TRUE;
- if (vpnUtil.isDualRouterVpnUpdate(oldVpnListCopy, newVpnListCopy)) {
+ 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
return obj != null ? obj : requireNonNull(defaultObj);
}
- public boolean isDualRouterVpnUpdate(List<String> oldVpnListCopy, List<String> newVpnListCopy) {
- if (oldVpnListCopy.size() == 2 && newVpnListCopy.size() == 3
- || oldVpnListCopy.size() == 3 && newVpnListCopy.size() == 2) {
- return true;
- }
- return false;
+ public static boolean isDualRouterVpnUpdate(List<String> oldVpnListCopy, List<String> newVpnListCopy) {
+ return oldVpnListCopy.size() == 2 && newVpnListCopy.size() == 3
+ || oldVpnListCopy.size() == 3 && newVpnListCopy.size() == 2;
}
}