class NonEmptyListValidator implements ConfigDef.Validator {

    @Override
    public void ensureValid(String name, Object value) {
        if (value == null || ((List) value).isEmpty()) {
            throw new ConfigException(name, value, "Empty list");
        }
    }

}