Closed danilodeLuca closed 7 years ago
Thanks @danilodeLuca. I'll work on this, can you return new ArrayList<>() for now?
Yes, im doing it as workaround =D
I added a test to check this case, and it seems that it is fixed: 92b538a332a11d9499abe6bf74838fd65cb2a0c6 Can you confirm, @danilodeLuca?
Not posible to return java.util.Collections.emptyList() in @GET Action method.
java.lang.SecurityException: java.lang.IllegalAccessException: Reflection is not allowed on private java.util.Collections$EmptyList() at com.google.appengine.runtime.Request.process-f9c03277441826fc(Request.java) at java.lang.reflect.Constructor.setAccessible(Constructor.java:40) at com.google.gson.internal.ConstructorConstructor.newDefaultConstructor(ConstructorConstructor.java:97) at com.google.gson.internal.ConstructorConstructor.get(ConstructorConstructor.java:79) at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53) at com.google.gson.Gson.getAdapter(Gson.java:356) at com.google.gson.Gson.toJson(Gson.java:585) at com.google.gson.Gson.toJson(Gson.java:572) at com.google.gson.Gson.toJson(Gson.java:527) at com.google.gson.Gson.toJson(Gson.java:507) at io.yawp.commons.utils.JsonUtils.to(JsonUtils.java:37) at io.yawp.servlet.rest.RestAction.execute(RestAction.java:122) at io.yawp.servlet.EndpointRouter.executeRestAction(EndpointRouter.java:221) at io.yawp.servlet.EndpointServlet.execute(EndpointServlet.java:119) at io.yawp.servlet.EndpointServlet.service(EndpointServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)