Thomas Broyer commented on Bug MGWT-340

I'm tempted to close this issue as a WontFix, for several reasons including:

  • RPC mocks created by gwt-test-util should implement ServiceDefTarget if the goal is to mimick GWT (I gave a quick look at their code and it seems like an easy patch), so please report the issue there too.
  • Util.getInstance() uses the singleton-pattern, which everybody knows is Evil™. If you use it in your tests, you probably have a bigger problem than this ClassCastException (architecture, tests possibly stepping into each others). You're being injected the mock in your test class, so use it instead of getting the instance from yet another place. If it were only me, I'd simply get rid of it.

However, Util.getInstance has actually no reason to call setServiceEntryPoint when there's a @RemoteServiceRelativePath annotation, so I'm gonna fix that (reduce Util.getInstance to a simple call to GWT.create + the singleton-pattern, making it almost useless but not breaking anyone's code) and close your case.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to