spring-loaded icon indicating copy to clipboard operation
spring-loaded copied to clipboard

ClassCastException deserializing guava ImmutableList

Open panchenko opened this issue 9 years ago • 0 comments

java.lang.ClassCastException: cannot assign instance of com.google.common.collect.ImmutableList$SerializedForm to field com.foo.Bar.authorities of type java.util.Collection in instance of com.foo.Bar

Serialization is used to clone an object, like so:

clone = (Bar) org.springframework.util.SerializationUtils.deserialize( org.springframework.util.SerializationUtils.serialize(bar) );

panchenko avatar Oct 12 '15 08:10 panchenko