users@jersey.java.net

Re: [Jersey] Choosing a Provider for a MediaType in Ambiguous Conditions

From: Stephen Duncan Jr <stephen.duncan_at_gmail.com>
Date: Wed, 8 Apr 2009 10:24:38 -0400

On Tue, Apr 7, 2009 at 4:22 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:

> Hi Stephen,
> This is a known issue in JAX-RS.
>
> I think there is a way to fix this in Jersey by sorting the message body
> readers/writers such that readers/writers with the most specific generic
> type occur first and thus the isWriteable/isReadable if the more specifc
> generic types are called first. (Such general sorting is non-trivial for
> complex types, and there may be more than one solution, but for Class types
> it is easy).
>
> Thus readers/writers for String or StreamOutput would occur before Object
> (which is what the Jackson JSON readers/writers support).
>
> Could you log an issue?
>
> Thanks,
> Paul.
>
> On Apr 7, 2009, at 3:57 AM, Stephen Duncan Jr wrote:
>

Logged as Issue 261: https://jersey.dev.java.net/issues/show_bug.cgi?id=261

-- 
Stephen Duncan Jr
www.stephenduncanjr.com