Using Guava 14.0 with GWT RPC 2.5.1-rc1, built with maven as described in Guava libraries and GWT
Deserialization of Guava collections seems to be working fine. I have however run into a SerializationException when trying to deserialize a response DTO containing an Optional.Present.
Caused by: com.google.gwt.user.client.rpc.SerializationException: com.google.common.base.Present/3434853995
at com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:153)
Looking at the SerializerBase.java:146 the methodToJava map does not contain:
com.google.common.base.Present/3434853995
It does however contain a CustomFieldSerializer for:
com.google.common.base.Present/3491224270
So, what is up with the /3434853995 mapping?
It would seem like this is the hash (computed at compile-time) that SerializerBase use to make sure the server side type is the same as the client side type. Looking at the guava-gwt and the server side guava Optional.Present, these do not match. And since the Present is instantiated at the server side, its hash is not matching the client side Present?