Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Handle iterables #13

avibryant opened this Issue · 3 comments

3 participants


The specific instance I ran into was MapLike.DefaultValuesIterable, but I bet there are other similar classes that also don't serialize.


I added an Iterable serializer, but the problem is on the deserialization side you are going to get something acts as if it was just: Iterable(1,2,3), which may not be the type that some other code is exception.

I tried to add a direct serializer, but I had a bit of trouble getting the Class object associated with this type due to the f-bounded polymorphism. Reflection may have to come into play. Since it is, the best approach is probably to use Kryo's JavaSerializer for this type (especially since it probably isn't too common).

That, or you can manually convert that type into a List or something (using .toList) before you pass it along.

If you are able to create a class object for this type, just do:

.javaForClass(ClassManifest.fromClass(/* class object here */))

(using the RichKryo enrichment).


Avi, could you make a test case that fails with the specific one you wanted? We can just use reflection with specific field tricks to do these corner cases.

That or close the issue and let's forget about it.


Closing; we can revive this bad dog if it comes up again.

@sritchie sritchie closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.