users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Response.close() and Response.hasEntity()

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Thu, 16 Aug 2012 13:31:11 +0100

Consider Response containing a non InputStream entity.

What is the expected Response.hasEntity() result after Response.close()
has been called ?

I suppose it should return 'true' - but I'm not 100% sure.
Should close() simply set the entity, whatever type it has to 'null',
after closing it (in case of the entity being of type InputStream) ?
If yes, then of course hasEntity() will return 'false' consistently.

Thanks, Sergey