Done: https://code.google.com/p/google-web-toolkit/issues/detail?id=8104
On Wednesday, April 10, 2013 10:23:43 AM UTC+2, Thomas Broyer wrote: > > Please open an issue. I don't have time to do it right now but > (tentatively) reproducing the issue is really easy in the current RF test > suite > (com.google.web.bindery.requestfactory.gwt.client.RequestFactoryTest#testNullEntityProxyResult), > > so no need to attach a repro case (just link to this thread). > > On Tuesday, April 9, 2013 10:51:19 AM UTC+2, Gordan Krešić wrote: >> >> In pretty basic RF scenario, I'm fetching one EntityProxy from server: >> >> myRequestContext.search(url).with("path1", "path2").to(...).fire() >> >> MyRequestContext.java: >> >> @Service(ModelService.class) >> public interface MyRequestContext extends RequestContext { >> >> Request<ModelProxy> search(String url); >> >> } >> >> ModelService.search(String url) returns valid Model object *or* null if >> not found. >> >> Problem is, if search returns null value, .with(...) part in my client >> request causes NPE on server: >> >> 09.04.2013. 10:34:48 >> com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost >> SEVERE: Unexpected error >> java.lang.NullPointerException >> at >> com.google.web.bindery.requestfactory.server.Resolver.addPathsToResolution(Resolver.java:488) >> at >> com.google.web.bindery.requestfactory.server.Resolver.resolveClientValue(Resolver.java:406) >> at >> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:491) >> at >> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:233) >> at >> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:135) >> at >> com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133) >> (...) >> >> If I omit ".with(...)" part, request goes ok, giving me null or >> ModelProxy instance (but without paths). >> >> My current workaround is dumb but straightforward - two-phase search: >> first without paths and if return value is not-null then I repeat same >> request with paths. Where is the problem and is there a better workaround? >> >> GWT is 2.5.1 >> > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.