dev@jsr311.java.net

Re: JSR311: GenericEntity + extending Response

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 20 Aug 2008 10:11:36 -0400

Paul Sandoz wrote:
>
> On Aug 20, 2008, at 2:39 AM, Bill Burke wrote:
>
>> For javax.ws.rs.core.Response, spec says that "An application class
>> can extend this class directly or can use one the static methods to
>> create an instance using a ResponseBuilder."
>>
>> The problem with this is that if the user sets the entity to be a
>> GenericEntity, the runtime has no way of getting at the type
>> information that GenericEntity is supposed to provide as getEntity()
>> is supposed to unwrap GenericEntity.
>>
>
> That JavaDoc is written from the intent of the runtime processing a
> Response instance, but i think it can be made clearer. It is the runtime
> processing the response that checks if the entity is an instance of
> GenericEntity and if so unwraps the information in the GenericEntity
> instance.
>

I'm confused...

So getEntity() is supposed to return GenericEntity?

Thanks.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com