users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Filters and generic entities

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Mon, 13 May 2013 14:42:16 +0100

On 13/05/13 14:35, Bill Burke wrote:
>
>
> On 5/13/2013 9:31 AM, Sergey Beryozkin wrote:
>> Hi Bill
>> On 13/05/13 14:21, Bill Burke wrote:
>>> What I mean is that either add those two methods, or change the
>>> signature of getEntity() to GenericEntity getEntity(). Which I don't
>>> think is possible because of backard compatibility?
>>
>> I think adding those 2 methods may be the right thing to do, it will
>> make it consistent with the way the type info is presented by filter
>> contexts. The only concern is that on the client side, I guess it is
>> typical that the client code will call Response.readEntity, not
>> getEntity(), but I guess these extra methods won't harm...
>>
>> In meantime I'm updating our code to unwrap GenericEntity in
>> Response.getEntity().
>>
>
> I don't know about you, but I actually have those two methods in both my
> server and client side implementations of Response already.
>
Yea, I have our internal code not relying on Response.getEntity() now
too for the purpose of working with the entity; but it is a good idea to
assume Response has these methods and so use them.

Sergey