Please add unit-tests (even better if you test edge-cases).

Also, John no longer works at Google (or has he moved to other
offices?), and is probably not the best fit for a review on
RequestFactory.

Finally, could you please base your patch on trunk rather than
releases/2.5 (not really an issue here, as there are very few
differences between the two branches, but still a good practice to
follow).


http://gwt-code-reviews.appspot.com/1764804/diff/1/user/src/com/google/web/bindery/requestfactory/server/ResolverServiceLayer.java
File
user/src/com/google/web/bindery/requestfactory/server/ResolverServiceLayer.java
(right):

http://gwt-code-reviews.appspot.com/1764804/diff/1/user/src/com/google/web/bindery/requestfactory/server/ResolverServiceLayer.java#newcode84
user/src/com/google/web/bindery/requestfactory/server/ResolverServiceLayer.java:84:
classes.addAll(Arrays.asList(domainClass.getInterfaces()));
To be complete, you'd have to call getInterfaces() on all
getSuperclass(), and also call getInterfaces() recursively on all
interfaces.

Imagine a case with "interface I2 extends I1", "class C2 extends C1" and
"class C1 implements I2", and you have a @ProxyFor(I1.class).
To find the proxy, getSuperclass on C2 will give you C1, getInterfaces
on C1 will give you I2, and finally getInterfaces on I2 will give you
I1.

The easiest here would be to make a recursive call (and take advantage
of the fact getSuperclass() returns 'null' for interfaces, so you don't
even have to tell interfaces apart and just use the same method for
everything).

http://gwt-code-reviews.appspot.com/1764804/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to