Just found the answer, and luckily in my case it was simple to
solve....
I have a subtype of List<T> called PageImpl<T>, which had another
List<T> containing the page items, plus the total count.
Then (and I think is a problem in GWT compiler), the compiler resolves
FocusListenerCollection, which extends ArrayList<FocusListener> to be
a subclass of List<T>.
As a result, ALL occurrences of Collection of anything in any RPC
method, by having PageImpl as a subclass of collection, had added
those ListenerCollections as possible result types, generated code to
handle them (50k in my case) and issued the warnings.
The solution (in better words: hack) was to change PageImpl to not
have a List of page items, but a LinkedList (it then converts the
receiving list into a LinkedList, which is even a penalty in my case).
As no ListenerCollection extends LinkedList, the problem is gone.

Ah, I also had an RPC which result type was List<List<String>>. The
same problem. As it was just for testing, I changed it to List<String[]
>.

But I'd really want to hear from a GWT dev if this is not a bug in the
compiler...

On 11 dez, 13:04, Ashar Lohmar <asharloh...@gmail.com> wrote:
> Hi I'm having the same kind of problem.
> in my app i use some libraries/object written in Java 1.4 style
> the objects implement Serializable but contain Lists or Maps which are
> declare without parameters
>  i mean List instead of List<E>, as the Java 1.4 requires
> and some RPC classes return this kind of objects but on Gwt-compiling
> I endup with a lot of code referencing all kinds of Listeners and
> stuffs that are unrelated to the RPC service.
>
> Basically the messages appear because the Listeners are deprecated,but
> what are they doing there in the first place ?
>
> hope someone will clear this up
>
> On Dec 8, 7:24 pm, Luis Fernando Planella Gonzalez
>
> <lfpg....@gmail.com> wrote:
> > Hi.
> > We're using GWT 1.7 and I'm starting to experiment with 2.0 RC2 to
> > evaluate GWT.runAsync().
>
> > However, now as I compile the app, I get warning for deprecations in
> > all RPC methods which return collections. I guess it's because the
> > result is declared as java.util.Collection, and the deprecated
> > com.google.gwt.user.client.ui.*ListenerCollection classes extends
> > ArrayList, making even the alternative to change the result of RPC
> > methods to ArrayList instead of Collection don't work.
>
> > The log is something like this, multiple times:
> >             [WARN] Warnings in 'generated://
> > 8D0B12EA4B123D9B133384111C9A7E38/nl/strohalm/cyclos/client/app/users/
> > images/UserImageRemoteService_TypeSerializer.java'
> >                [WARN] Line 50: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.ChangeListenerCollection'
> >                [WARN] Line 55: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.ClickListenerCollection'
> >                [WARN] Line 60: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.FocusListenerCollection'
> >                [WARN] Line 65: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.FormHandlerCollection'
> >                [WARN] Line 70: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.KeyboardListenerCollection'
> >                [WARN] Line 75: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.LoadListenerCollection'
> >                [WARN] Line 80: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.MouseListenerCollection'
> >                [WARN] Line 85: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.MouseWheelListenerCollection'
> >                [WARN] Line 90: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.PopupListenerCollection'
> >                [WARN] Line 95: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.ScrollListenerCollection'
> >                [WARN] Line 100: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.TabListenerCollection'
> >                [WARN] Line 105: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.TableListenerCollection'
> >                [WARN] Line 110: Referencing deprecated class
> > 'com.google.gwt.user.client.ui.TreeListenerCollection'
> >                See snapshot: /tmp/
> > UserImageRemoteService_TypeSerializer2951604978153994580.java
>
> > Is there a way to remove those classes from being handled in RPC?

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to