I think GWT-RPC uses the CustomSerializer for the HashMap (which calls put() 
for each key/value pair) in addition to deserializing the ArrayList. The 
custom-serializer will then call your put() methods which will add to the 
list.
Marking the ArrayList 'transient' or @GwtTransient should be enough to fix 
it (the list won't be serialized, but instead rebuilt by the put() calls 
when the object is deserialized). You could also wrap a HashMap instead of 
extending hashMap.

BTW, your code is lively buggy, as you unconditionnally add to the list, 
without ever checking whether it already contains an entry for the key (i.e. 
put("a", "b"); put("a", "c"); will give you ["a", "a"] in getData(), whereas 
the Map only contains a single entry, for key "a")

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/SgP9eOLv8oYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to