I don't think you need the List here you can just initialize the array directly? 
```
BytesRef[] uids = new BytesRef[items.size()];
int idx = 0;
for (MultiGetRequest.Item item : items) {
  uids[idx++] = creatUidAsBytes(item);
}
return uids;
```