fillThriftCollection(list, elemField, bag);
return list;
}
private static TEnum toThriftEnum(Field elemField, String name) {
TEnum out = elemField.getEnumValueOf(name);
if (out == null) {
throw new IllegalArgumentException(
String.format("Failed to convert string '%s'" +
" to enum value of type '%s'", name,
ThriftUtils.getFieldValueType(elemField).getName()));