users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Entity suffers from generic type problems

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 15 Jun 2012 12:36:23 +0200

Hi Bill,

Can you please file a JIRA issue (if not done yet)? I've just returned from hospital and I'm in the middle of something else at the same time, so I'd like to find some more quiet time and get back to it later and make sure it's not forgotten buried under new emails.

Thanks,
Marek

On May 30, 2012, at 10:37 PM, Bill Burke wrote:

> The javax.ws.rs.client.Entity class suffers from the same generic type problems that exist for ResponseBuilder and the reason GenericEntity exists.
>
> See attached file:
>
> proposed changes:
>
> * @Deprecate GenericEntity. I'd rather do this because Entity is a shorter name.
> * Change ClientRequestContext.setEntity to accept an Entity class parameter only
> * Same static methods as before
> * Entity now has a getAnnotations() method
> * Entity now has a Type getType() method
>
> * some new constructors that allow you set various things
>
> new Entity<List<String>>(obj, MediaType.XML){};
> new Entity<List<String>>(obj, myVariant, myAnnotations){};
>
> new Entity(obj, genericType, myVariant, myAnnotations);
>
>
>
>
>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> <Entity.java>