I guess we should throw IllegalStateException in such case.
Marek
On Aug 16, 2012, at 2:31 PM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:
> 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