Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Serialization of Guava collections #464

Answered by hg-ms
fedordar asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
it should be possible to get the Guava ImmutableList persisted. Using a custom PersistenceFieldEvaluator is a suitable approach. One thing you must consider is that there are several implementations of the abstract ImmutableList. The example below handles the RegularImmutableList and SingletonImmutableList implementations.

Why your PersistenceFieldEvaluator did not work is hard to say, did you delete the storage after adding the PersistenceFieldEvaluator to ensure that there is no old data (that has the transient array not peristed)?

One other tip: You can have a look in the PersistenceTypeDictionary.ptd file in the storage directory to identify all persisted classes and the fields…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fedordar
Comment options

Answer selected by fedordar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants