Closed GoogleCodeExporter closed 8 years ago
Actually, upon further review, prefixLength is transient. So not a bug, but if
you have a better work around, I'd love to here it
Original comment by dturan...@gmail.com
on 2 Oct 2013 at 6:00
Kryo 2.22 was release just 2 days ago. Could you try with this version? It
introduced some improvements when it comes to handling of transient fields
inside classes, which seems to be the case here ("private transient int
prefixLength").
Normally, transient fields are not serialized by default. But they are copied,
if you use the Kryo.copy() method.
BTW, your way of solving the problem is not wrong. Basically, classes having
transient fields usually require special handling. This is why java.io.File
provides writeObject/readObject methods. For Kryo you can create a custom
serializer for the File class and then register it.
Have you looked at this project?
https://github.com/magro/kryo-serializers
It provides a lot of useful serializers for many classes.
Original comment by romixlev
on 2 Oct 2013 at 6:06
Original comment by romixlev
on 17 Oct 2013 at 7:16
Original issue reported on code.google.com by
dturan...@gmail.com
on 2 Oct 2013 at 5:57