users@jersey.java.net

Re: [Jersey] Re: resources inheritance

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 12 Aug 2009 09:42:04 +0200

On Aug 12, 2009, at 9:23 AM, Felipe Gaścho wrote:

> Hi Martin,
>
> no, I don't use Vector.. it is just the message from jersey :)
>

The Java type logged will originate from the class of entity returned:

So for:

        public Collection<T> selectAll(@PathParam("offset") int offset,
                        @PathParam("limit") int limit) {
                return getFacade().readAll(offset, limit);
        }

What is returned by readAll is an implementation of Vector (which
implements Collection).

Paul.

>
>> To fix the issue, you need to use a GenericEntity.
>
> ?? what you mean ?
>
> I fixed with arrays.. but still I need to provide a concrete array as
> parameter (a hook method acutally) in order to allow my service to
> respond the right type...
>
> as Sandoz commented, the type erasure of Generics do the mess :)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>