NPE with RequestFactory (GWT 2.4.0) when returned List contains a null value

56 views
Skip to first unread message

Alexandre Ardhuin

unread,
Sep 27, 2011, 4:22:37 AM9/27/11
to google-web-toolkit
Hi,

After migrate from gwt-2.3.0 to gwt-2.4.0, I face the following NPE when the requestFactory method returns a List containing a null value :

27 sept. 2011 10:10:39 com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost
GRAVE: Unexpected error
java.lang.NullPointerException
    at com.google.web.bindery.requestfactory.server.Resolver.resolveClientValue(Resolver.java:618)
    at com.google.web.bindery.requestfactory.server.Resolver.resolveClientValue(Resolver.java:383)
    at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:483)
    at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:225)
    at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:127)
    at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)

// in myRequest
Request<List<String>> getStringsWithNull();
Request<List<String>> getStringsWithoutNull();

// in implementation
public List<String> getStringsWithNull() {
  return Arrays.asList("test", null, "test");
}
public List<String> getStringsWithoutNull() {
  return Arrays.asList("test", "test");
}

Calling getStringsWithoutNull() works as expected but getStringsWithoutNull() throws the NPE.

Is there a explication for that or is it a bug ?

Alexandre.

Thomas Broyer

unread,
Sep 27, 2011, 4:48:17 AM9/27/11
to google-we...@googlegroups.com

Alexandre Ardhuin

unread,
Sep 27, 2011, 4:53:16 AM9/27/11
to google-we...@googlegroups.com
Oups, I had searched on this group but not in issue tracker.

Thanks Thomas
Reply all
Reply to author
Forward
0 new messages