1.5 final compiler warning

199 views
Skip to first unread message

elliot

unread,
Aug 29, 2008, 12:44:57 AM8/29/08
to Google Web Toolkit
Map<String, String> as an rpc parameter generates a warning
immediately after updating from 1.5.1 to 1.5.2

Analyzing methods:
public abstract List<String> getStuff
(java.util.Map<java.lang.String, java.lang.String> data)
Parameter: java.util.Map<java.lang.String,
java.lang.String> data
java.util.Map<java.lang.String, java.lang.String>
Verifying instantiability

com.google.gwt.i18n.client.impl.ConstantMap
Analyzing the fields of type
'com.google.gwt.i18n.client.impl.ConstantMap' that qualify for
serialization
[WARN] Field 'private final
com.google.gwt.i18n.client.impl.ConstantMap.OrderedConstantSet<java.lang.String>
keys' will not be serialized because it is final

keys used to be final, it aint different now.

havent had a chance to seriously look into it, but wanted to know if
anyone else saw it.

Timo

unread,
Aug 29, 2008, 6:08:46 AM8/29/08
to Google Web Toolkit
We got the same while changing to the trunk version from 26.08.2008
btw: same with the trunk of today!

Timo

bummel

unread,
Aug 29, 2008, 5:25:51 AM8/29/08
to Google Web Toolkit
since i upgraded from 1.5.1 to 1.5.2, I ecounterd the same behaviour
that makes my app unable to work properly

rolling back the upgrade waiting for better times...

On 29 Aug., 06:44, elliot <Elliot.W...@gmail.com> wrote:

Miguel Méndez

unread,
Aug 29, 2008, 12:56:23 PM8/29/08
to Google-We...@googlegroups.com
The warning was accidentally disabled in the 1.5 RC versions.  It should not prevent your application from working correctly since it is only a warning and final fields have never been serialized.

You can disable the warning by adding the following line to you module file (*.gwt.xml):

<set-property name="gwt.suppressNonStaticFinalFieldWarnings" value="true" />
--
Miguel

elliot

unread,
Aug 29, 2008, 7:12:00 PM8/29/08
to Google Web Toolkit
thanks for the info, miguel.

btw, 1.5.2 was a flawless upgrade for me.

jschwarz0

unread,
Sep 5, 2008, 8:55:22 AM9/5/08
to Google Web Toolkit
My app was broken this way too...
However, then I noticed I forgot to update my shared/lib/gwt-
servlet.jar file.
After replacing this file with the new one and a tomkitty restart, my
app was fine.
Thanks, Miguel

chris.f.jones

unread,
Sep 5, 2008, 1:23:50 PM9/5/08
to Google Web Toolkit
Since this error sources from
com.google.gwt.i18n.client.impl.ConstantMap via
java.util.Map<java.lang.String, java.lang.String>, shouldn't the
field:
private final ConstantMap.OrderedConstantSet<java.lang.String>
be declared as transient?

Victor

unread,
Sep 25, 2008, 11:46:21 AM9/25/08
to Google Web Toolkit
I've seen that many people solved their problems replacing the gwt-
servlet.jar file with the new one, but I'm pretty sure I no more have
the gwt-servlet-1.5RC1.jar file on my system.

How could I solve the problem ?

The exact message is :

Field 'private final
com.google.gwt.i18n.client.impl.ConstantMap.OrderedConstantSet<java.lang.String>
keys' will not be serialized because it is final

Thank you,

ben

unread,
Sep 29, 2008, 4:45:10 PM9/29/08
to Google Web Toolkit
I'm using 1.5.2 and am getting the issue with a Hashmap, exact same
final error as Victor received. But everything seems to work, not
sure I want to suppress the problem though.

Is this something that I have implemented incorrectly, or something
with the GWT compiler?
> > privatefinalConstantMap.OrderedConstantSet<java.lang.String>
> > be declared as transient?

Joachim

unread,
Oct 20, 2008, 8:36:39 AM10/20/08
to Google Web Toolkit
Unfortunately, the issue in
com.google.gwt.i18n.client.impl.ConstantMap.OrderedConstantSet<java.lang.String>
persists as of GWT 1.5.3 :(

On 29 Sep., 23:45, ben <sidevi...@gmail.com> wrote:
> I'm using 1.5.2 and am getting the issue with a Hashmap, exact same
> final error as Victor received.  But everything seems to work, not
> sure I want to suppress the problem though.
>
> Is this something that I have implemented incorrectly, or something
> with the GWT compiler?
>
> On Sep 25, 11:46 am, Victor <vmont...@gmail.com> wrote:
>
>
>
> > I've seen that many people solved their problems replacing the gwt-
> > servlet.jar file with the new one, but I'm pretty sure I no more have
> > the gwt-servlet-1.5RC1.jar file on my system.
>
> > How could I solve the problem ?
>
> > The exact message is :
>
> > Field 'privatefinal
> > com.google.gwt.i18n.client.impl.ConstantMap.OrderedConstantSet<java.lang.St­ring>
Reply all
Reply to author
Forward
0 new messages