dev@jsr311.java.net

GenericEntity + extending Response

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 19 Aug 2008 20:39:16 -0400

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.

Either don't allow users to extend Response or add a getGenericType()
method to Response. I vote for adding a getGenericType() method.

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