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

From: Bill Burke <>
Date: Wed, 08 May 2013 06:18:17 -0400

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);


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

Bill Burke
JBoss, a division of Red Hat