[jax-rs-spec users] [jsr339-experts] Re: readEntity() question (relates to TCK)

From: Bill Burke <>
Date: Wed, 08 May 2013 07:52:18 -0400

nevermind, ,sorry to waste your time

On 5/8/2013 6:18 AM, Bill Burke wrote:
> Say you do an abortWith() in a ClientRequestFilter
> ctx.abortWith(Response.ok(new Integer(42)).build());
> This should fail shouldn't it?
> String val = response.readEntity(String.class);
> why?
> Firstly, is the response supposed to *buffer* the Integer object? I
> don't remember ever agreeing to this requirement. IMO, this should fail
> because the underlying entity's Java type is not String. Even so,
> there's also no default provider that turns Integer of type */* into a
> raw byte array, nor a provider that unmarshals a raw byte array into a
> String.

Bill Burke
JBoss, a division of Red Hat