@Override
    public List<Object> read(final Kryo kryo, final Input input, final Class<? extends List<Object>> aClass) {
        val size = input.readInt(true);
        val list = IntStream.range(0, size).mapToObj(i -> kryo.readClassAndObject(input)).toArray();
        return Arrays.stream(list).collect(Collectors.toList());
    }
This is {@link ImmutableNativeJavaListSerializer}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-memcached-core/src/main/java/org/apereo/cas/memcached/kryo/serial/ImmutableNativeJavaListSerializer.java