users@jsr311.java.net

Re: MediaType.isComaptible

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 14 Aug 2008 13:22:39 -0400

Marc Hadley wrote:
> On Aug 14, 2008, at 11:51 AM, Paul Sandoz wrote:
>>
>> Actually i am scratching my head wondering why we specified the q
>> parameter for media types on @Produces/_at_Consumes!
>>
>> It does not seem to add much value since the client decides what it
>> wants and in what priority. All it seems to add is "i support Java
>> type T for media type X better than you do". Plus when writing your
>> reader/writer you have to know that some reader/writer may support
>> Java T for media type X better than you do in advance because the
>> maximum and default value is 1.0.
>>
>> I propose we remove it.
>>
> +1, it does seem unnecessarily complex now I think about it.
>

On a tangent, but related note...

Why keep "q" a part of the MediaType's attributes? Its not really an
attribute, just a qualifier for preference.

I propose having a float getQualifier() on MediaType and filter out q.

Bill

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com