[jax-rs-spec users] [jsr339-experts] Consistent Response.bufferEntity() response

From: Sergey Beryozkin <>
Date: Thu, 16 Aug 2012 16:59:24 +0100

Response.bufferEntity() response is supposed to return a consistent
result across all the invocations on a given Response instance.

The Response.bufferEntity() docs say that Response.close() should lead
to "the implementations ... releasing the buffered message entity data"
(minor modifications of the text).

The question is the following correct or not:

// this is given
assertTrue(response.getEntity() instanceof InputStream);

// the actual test

// ???

Thanks, Sergey

P.S. Minor typo in the docs: bufferEntity docs say
MessageprocessingException is thrown if readEntity(...) is called on the
closed Response; bufferEntity docs say it should be IllegalStateException