I was warned against using Guava immutable collections in objects used in serialized communication because if the version of Guava on one end were updated, there could be se
Let's give some perspective.
The most prominent uses of serialization are:
Guava is totally fine for application 2, if you control which Guava version is being used on both the client and the server. Moreover, while Guava doesn't make guarantees on the consistency of serialization between Guava versions...in reality, the serialized forms don't change very often.
On the other hand, let me give some perspective as to why Guava doesn't guarantee the consistency of serialized forms. I changed the serialized form of ImmutableMultiset between Guava releases 9 and 10, and the reason why was because I needed to refactor things so I could add ImmutableSortedMultiset to the immutable collections. You can see the change yourself here. Trying to do this same refactoring while keeping the serialized forms consistent would have almost certainly required additional awkward hacks, which are...pretty strongly against the Guava team's philosophy. (It might have been doable by a more expert programmer than myself, but I still claim it wouldn't have been trivial.) Guaranteeing serialization compatibility for the long term would have required staggering amounts of effort, as discussed in the above linked mailing list thread, Kevin stated:
Trying to provide for cross-version compatibility made things a hundred times more difficult and we gave up on it before Guava even started.
and Jared:
The underlying problem is still there: ensuring that the serialized forms are compatible between all Guava versions. That was a goal of mine when working towards Google Collections 1.0, but I abandoned that goal after realizing its difficulty. Implementing and testing cross-version compatibility wasn't worth the effort.
Finally, I'll point out that Guava gets used internally at Google all over the place and manages pretty well.
Yes, that is a valid concern.
From the Guava project homepage (http://code.google.com/p/guava-libraries/):
Serialized forms of ALL objects are subject to change. Do not persist these and assume they can be read by a future version of the library.
If you're using Java native serialization Guava is not a good choice.