GWT 1.5 introduced generics. Where before you might have had an RPC argument of "ArrayList
bar", you will now have "ArrayList<Foo> bar"
See here:
http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/ReleaseNotes_1_5_Rpc
and here:
http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/ReleaseNotes_1_5_ImportantNotes
If you just have "ArrayList bar", then it doesn't know anything about the class
of things that will be in the list, and so GWT would have to search for every possible
serializable class and generate javascript for handling the serialization of them. So the
compiler makes you specify a supertype of the elements in the collection to narrow down
the type of object in there. You should be as specific as possible.
HTH
Paul
On 18/08/11 10:27, David wrote:
When I upgrade GWT version from 1.4.60 to 1.5.3 in my project, I run at hosted
mode, I found many errors like below:
[WARN] In order to produce smaller client-side code, 'Object' is not allowed;
consider using a more specific type
Although I can see the pages at hosted mode, but no data can't be retrieved
from server, I think the error above results in it.
please note all works fine in web mode.
Anyone can help me? thanks in advance.
--
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/-/dRy1nVVulPgJ.
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.
--
You received this message because you are subscribed to the Google Groups "Google
Web Toolkit" group.
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.