in chill-java/src/main/java/com/twitter/chill/java/ArraysAsListSerializer.java [74:86]
public List<?> read(final Kryo kryo, final Input input, final Class<List<?>> type) {
final int length = input.readInt(true);
Class<?> componentType = kryo.readClass(input).getType();
try {
final Object items = Array.newInstance(getBoxedClass(componentType), length);
for (int i = 0; i < length; i++) {
Array.set(items, i, kryo.readClassAndObject(input));
}
return Arrays.asList((Object[]) items);
} catch (final Exception e) {
throw new RuntimeException(e);
}
}