prefer:

```
    String value = "";
    if (requiredFieldList != null) {
      List<Integer> indices = Lists.newArrayList();
      for(RequiredField f : requiredFieldList.getFields()) {
        indices.add(f.getIndex());
      }
      value = Joiner.on(",").join(indices);
    }
    conf.set(RCFileUtil.REQUIRED_FIELD_INDICES_CONF, value);
```