My favorites | Sign in
GWT
Project Home Downloads Wiki Issues Source
New issue   Search
for
  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 sandy...@gmail.com, Jun 4, 2007
Found in GWT Release:
1.4.10

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
compiling.


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:
http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_frm/thread/61dfd059986045a0

GWTInterfacesAndRpc.zip
7.2 KB   Download
Jun 4, 2007
#1 gwt.team...@gmail.com
Sounds definitely like a mistake -- thanks sandymac!
Labels: -Priority-Medium Priority-Critical Category-RPC Milestone-1_4_RC2
Jun 4, 2007
#2 gwt.team...@gmail.com
(No comment was entered for this change.)
Owner: gwt.team.mmendez
Cc: gwt.team.bruce gwt.team.jgw gwt.team.scottb
Jun 25, 2007
#3 gwt.team...@gmail.com
(No comment was entered for this change.)
Status: Started
Jun 28, 2007
#4 gwt.team...@gmail.com
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.
issues_1161_1163-r1205.patch
27.6 KB   Download
Status: ReviewPending
Labels: ReviewBy-scottb
Jun 28, 2007
#5 gwt.team...@gmail.com
(No comment was entered for this change.)
Status: Started
Labels: -ReviewBy-scottb
Jun 28, 2007
#6 gwt.team...@gmail.com
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.
issues_1129_1161_1163-r1205.patch
42.2 KB   Download
Status: ReviewPending
Jun 28, 2007
#7 gwt.team...@gmail.com
(No comment was entered for this change.)
Labels: ReviewBy-scottb
Jun 28, 2007
#8 gwt.team...@gmail.com
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.

General:
- 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
#9 gwt.team...@gmail.com
Committed as r1228.
Status: FixedNotReleased
Aug 20, 2007
#10 gwt.team...@gmail.com
1.4 RC2 now released.
Status: Fixed
Apr 28, 2008
#11 sumitcha...@google.com
 
Owner: mmendez
Apr 29, 2008
#12 br...@google.com
 
Apr 29, 2008
#13 br...@google.com
 
Apr 29, 2008
#14 br...@google.com
 
Cc: br...@google.com
Apr 29, 2008
#15 br...@google.com
 
Cc: -gwt.team.bruce
Apr 29, 2008
#16 sco...@google.com
 
Apr 29, 2008
#17 sco...@google.com
 
Cc: -gwt.team.scottb sco...@google.com
Apr 29, 2008
#18 jgw+personal@google.com
 
Cc: -gwt.team.jgw j...@google.com
Feb 8, 2011
#22 rjrjr@google.com
(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