jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Response.close() required?

From: Bill Burke <bburke_at_redhat.com>
Date: Fri, 20 Jan 2012 10:46:52 -0500

getEntityInputStream was removed.

On 1/20/12 5:00 AM, Sergey Beryozkin wrote:
> On 19/01/12 23:40, Bill Burke wrote:
>> Should probably be specified in javadoc and spec whether or not close()
>> is a required action.
>>
>
> Response has also the method getEntityInputStream() and the InputStream
> in a given Response seems to be the only resource which may need to be
> eagerly closed.
>
> Response entity can also be a bean instance, JAXP Source,
> StreamingOutput and for these typed of entities calling close() won't
> have any effect.
>
> Would it make sense to remove close() ? getEntityInputStream().close()
> can be always done instead
>
> Sergey

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