public static List<IPv4Restriction> getRestrictions(List<ClientRestriction> restrictions, String dbkey, Logger log) {
ArrayList<IPv4Restriction> ipv4Restrictions = new ArrayList<IPv4Restriction>();
Iterator<ClientRestriction> it = restrictions.iterator();
while (it.hasNext()) {
ClientRestriction restriction = it.next();
try {
IPv4Restriction ipV4Restriction = new IPv4Restriction(restriction);
ipv4Restrictions.add(ipV4Restriction);
} catch (Exception e) {
// restriction could not be parsed - skip
log.error("Client restriction on db '" + dbkey + "' of type '" + restriction.getType() + "' could not be parsed.", e);
}
}
return ipv4Restrictions;
}