http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java File user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java (right):
http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java#newcode95 user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java:95: public static SimpleBar returnFirst(List<SimpleBar> list) { On 2012/05/24 00:28:11, tbroyer wrote:
On 2012/05/23 18:05:24, skybrian wrote: > It's weird that this method isn't just inlined.
It can be called from the client-side, it's a "service method" (SimpleBarRequest).
Oh, I see. (Off topic rant.) This is just test code, but I'm annoyed that I have to search the codebase for interfaces annotated with @Service or @ServiceName that point to this class in order to tell whether a method I'm looking at is directly called over the Internet or not. That's pretty dangerous. There needs to be some kind of annotation cluing the reader in that this is an RPC endpoint. I think GWT-RPC did a better job here, because the class extends RemoteServiceServlet and implements the service interface. http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java File user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java#newcode117 user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java:117: SimpleProxyId<?> id = (SimpleProxyId<?>) foo.stableId(); On 2012/05/24 00:28:11, tbroyer wrote:
I could add a flag or counter in the 'if's and then check their values
after the
loops to assert this code has been reached?
Sure, I think that's good. Increment a counter and assert that it's >= 1 after the for loop. (If it drops to zero due to a code change and that's intentional, we have some dead code to delete.) http://gwt-code-reviews.appspot.com/1601806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
