On Tue, Oct 28, 2008 at 4:05 PM, Archer <
dfdum...@gmail.com> wrote:
> I'm annotating a method, using typeArgs, which returns a list of maps
> and am getting a SerializationException that tells me
> 'java.util.HashMap' was not included in the sererialization policy.
> (Stack trace below). I'm unsure exactly how to represent a list of
> maps and have tried both
> * @gwt.typeArgs <java.lang.String>
> And
> * @gwt.typeArgs <java.lang.String,java.lang.String>
>
> However, neither seems to be picked up. Any ideas what's wrong?
The typeArgs annotation was a poor-man's implementation of Java 5
generics. What you want is
@gwt.typeArgs <java.util.Map<java.lang.String, java.lang.String>>
or, if you know it's always going to be HashMap, you might get tighter
output with
@gwt.typeArgs <java.util.HashMap<java.lang.String, java.lang.String>>
You'd also benefit from upgrading to GWT 1.5, if possible.
Ian