users@jersey.java.net

Resolving parameterized types with type variable arguments now supported.

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Tue, 24 Aug 2010 17:49:07 +0200

Hi,

I recall a while ago a discussion on a limitation with Jersey and type
variables that are arguments of parameterized types. I have just
committed a fix so it is possible to support stuff like the following:

     public static class ParameterizedTypeResource<T, V> {
         @QueryParam("v") Collection<V> fieldV;

         List<List<V>> methodV;

         @QueryParam("v")
         public void set(List<List<V>> methodV) {
             this.methodV = methodV;
         }

         @GET
         public String get(@QueryParam("v") Map<String, List<V>> getV) {
             return "";
         }

         @POST
         public Collection<T> post(Collection<T> t) {
             return t;
         }

         @Path("sub")
         @POST
         public Collection<T> postSub(Collection<T> t) {
             return t;
         }
     }

     public static class ConcreteParameterizedTypeResource extends
ParameterizedTypeResource<String, String> {
     }

Type variable arrays are also supported.

Paul.