class IpUtils {

    public static List<InetSocketAddress> parseAddresses(List<String> addresses) {
        List<InetSocketAddress> result = new ArrayList<>();
        if(CollectionUtils.isNotEmpty(addresses)) {
            for(String a : addresses) {
                InetSocketAddress res = parseAddress(a);
                if (res != null) {
                    result.add(res);
                }
            }
        }
        return result;
    }

}