This method is not touching any state, make it static and adjust
the sole caller.
Change-Id: I44ab35b0a7b3419663d516d817a549e72a62e0c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
boolean isVpnInstanceUpdate = Boolean.FALSE;
final VpnInterfaceKey key = identifier.firstKeyOf(VpnInterface.class);
final String interfaceName = key.getName();
boolean isVpnInstanceUpdate = Boolean.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> 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);
List<String> newVpnListCopy = new ArrayList<>();
newVpnListCopy.addAll(newVpnList);
return VpnConstants.IP_MONITOR_JOB_PREFIX_KEY + "-" + vpnName + "-" + ip;
}
return VpnConstants.IP_MONITOR_JOB_PREFIX_KEY + "-" + vpnName + "-" + ip;
}
- public List<String> getVpnListForVpnInterface(VpnInterface vpnInter) {
+ public static List<String> getVpnListForVpnInterface(VpnInterface vpnInter) {
return requireNonNullElse(vpnInter.getVpnInstanceNames(), Collections.<VpnInstanceNames>emptyList()).stream()
.map(VpnInstanceNames::getVpnName).collect(Collectors.toList());
}
return requireNonNullElse(vpnInter.getVpnInstanceNames(), Collections.<VpnInstanceNames>emptyList()).stream()
.map(VpnInstanceNames::getVpnName).collect(Collectors.toList());
}