My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 1163: REGRESSION: 1.4.10RC RPC: using interfaces as parameters of serializable types confused the RPC sanity checking
1 person starred this issue and may be notified of changes. Back to list
Reported by, Jun 4, 2007
Found in GWT Release:

Detailed description:
Two closely related problems.

1. Using an interface with a sub-interface as a RPC method parameter or
return type cause RPC sanity checking to think that there is a subtype
without a default constructor or no-arg ctor. eg:

interface A extends IsSerializable { ...
interface B extends A { ...

While interface B doesn't have a default constructor, that is a restriction
of an interface.

2. If said interface is used more than once in a RemoteService than the
warning issued for above becomes an ERROR preventing the application from

Attached is an example project that demonstrates these issues.

Workaround if you have one:
Don't use interfaces in RemoteServices.

Links to the relevant GWT Developer Forum posts:
7.2 KB   Download
Jun 4, 2007
Sounds definitely like a mistake -- thanks sandymac!
Labels: -Priority-Medium Priority-Critical Category-RPC Milestone-1_4_RC2
Jun 4, 2007
(No comment was entered for this change.)
Jun 25, 2007
(No comment was entered for this change.)
Status: Started
Jun 28, 2007
The attached patch fixes issues 1161 and 1163.  Seemed like a good idea to put them
together since they impact the same file.

 Issue 1161 : 
We only checked for native methods if the class was automatically serializable. 
Since all of our JRE classes with native methods use custom field serializers we
never saw the native method warning.  When external developers added auto
serializable types to the JRE they did get warnings.  This patch will check any
serializable types for native methods.  The check is skipped if the type is part of
the JRE emulation.  We assume that all types whose package names begin with "java."
are not part of our JRE.    This does not account for javax and org.* packages which
are part of the real JRE.

 Issue 1163 :
There were a few problems with this code.  First, when generating a log message we
did not store whether or not it was a warning or an error.  If the type was seen
multiple times, it was possible that what was previously a warning would be treated
as an error.

Second, abstract classes that did not have any instantiable subtypes would be
considered an error.

Third, I removed several warnings about assignment to parameters and member
visibility causing synthetic access methods to be generated.
27.6 KB   Download
Status: ReviewPending
Labels: ReviewBy-scottb
Jun 28, 2007
(No comment was entered for this change.)
Status: Started
Labels: -ReviewBy-scottb
Jun 28, 2007
Please review this latest patch.  It addresses  issue 1129 , also removed some test
code which was no longer necessary.

The fix is that if we are in a manually serialized type that uses Object or Object[]
we will consider all serializable subtypes of Object.  Without being able to deal
with arrays dynamically and without giving additional information to CFS this is the
best that we can do.  We should be able to handle this correctly in RPC v2.
42.2 KB   Download
Status: ReviewPending
Jun 28, 2007
(No comment was entered for this change.)
Labels: ReviewBy-scottb
Jun 28, 2007
I'm not clear on what UnserializableClass with a custom serializer actually means or
tests, but otherwise everything on the test end looks good.. glad to see the
workaround is no longer needed.

As for SerializableTypeOracleBuilder:
227: This would seem to make unserializable a type which had generated only warnings;
is this the intent?
669: I'm not clear why this line was added.
654(old rev): Not clear on why this was removed.

- I notice not all warnings logged become warned issues attached to that type; is
this the intent?
- I see a few lines needing format (whitespaces)

Otherwise, LGTM.

Jul 10, 2007
Committed as r1228.
Status: FixedNotReleased
Aug 20, 2007
1.4 RC2 now released.
Status: Fixed
Apr 28, 2008
Owner: mmendez
Apr 29, 2008
Apr 29, 2008
Apr 29, 2008
Apr 29, 2008
Apr 29, 2008
Apr 29, 2008
Apr 29, 2008
Feb 8, 2011
(No comment was entered for this change.)
Labels: -Milestone-1_4_RC2 Milestone-1_4-RC2
Sign in to add a comment

Powered by Google Project Hosting