diff --git a/src/test/java/org/tynamo/resteasy/integration/ResteasyIntegrationTest.java b/src/test/java/org/tynamo/resteasy/integration/ResteasyIntegrationTest.java index 3c7c145..2c4a10b 100644 --- a/src/test/java/org/tynamo/resteasy/integration/ResteasyIntegrationTest.java +++ b/src/test/java/org/tynamo/resteasy/integration/ResteasyIntegrationTest.java @@ -54,4 +54,14 @@ public void testEchoGenericListOfLongs() throws Exception Assert.assertEquals(response, "1"); client.close(); } + + @Test + public void testEchoGenericListOfLongsWorkaround() throws Exception + { + Client client = ClientBuilder.newClient(); + Invocation.Builder builder = client.target(BASEURI + "mycustomresteasyprefix/echo/generic_longs_workaround").request(); + String response = builder.post(Entity.json("{\"params\": [1, 2, 3]}"), String.class); + Assert.assertEquals(response, "1"); + client.close(); + } } diff --git a/src/test/java/org/tynamo/resteasy/ws/ReloadableEchoResource.java b/src/test/java/org/tynamo/resteasy/ws/ReloadableEchoResource.java index 6828eba..789ba32 100644 --- a/src/test/java/org/tynamo/resteasy/ws/ReloadableEchoResource.java +++ b/src/test/java/org/tynamo/resteasy/ws/ReloadableEchoResource.java @@ -27,4 +27,15 @@ public interface ReloadableEchoResource @Consumes("application/json") @Produces("application/json") Response genericLongs(List params); + + class GenericLongsRequest + { + public List params; + } + + @POST + @Path("/generic_longs_workaround") + @Consumes("application/json") + @Produces("application/json") + Response genericLongsWorkaround(GenericLongsRequest request); } diff --git a/src/test/java/org/tynamo/resteasy/ws/ReloadableEchoResourceImpl.java b/src/test/java/org/tynamo/resteasy/ws/ReloadableEchoResourceImpl.java index 40d02fc..343c869 100644 --- a/src/test/java/org/tynamo/resteasy/ws/ReloadableEchoResourceImpl.java +++ b/src/test/java/org/tynamo/resteasy/ws/ReloadableEchoResourceImpl.java @@ -21,4 +21,11 @@ public Response genericLongs(List params) return Response.ok(first).build(); } + @Override + public Response genericLongsWorkaround(GenericLongsRequest request) + { + Long first = request.params.get(0); // OK + return Response.ok(first).build(); + } + } \ No newline at end of file