Tuesday, September 29, 2009

Google Web Toolkit RPC serialization error and Collections.EMPTY_LIST (Collections.emptyList())

Well, heading made my day.
Actually java.util.Collections.EMPTY_LIST and java.util.Collections.emptyList() are not GWT-serializable and will cause SerializationException being thrown on attempt to transfer them across the wire.

Beware!
Use new ArrayList() instead

No comments: