reader.readCollection(1, col);
reader.readRemainder();
return col;
}
else {
ImmutableArrayList data = new ImmutableArrayList(reader.readObjectArray(1, null));
Collection<?> col = listProto ? data.getList() : data.getSet();
reader.readRemainder();
return constructor.newInstance(col);
}
} catch (Exception e) {
throw new IOException("Failed to deserialize " + type.getName() + " instance", e);