[jax-rs-spec users] [jsr339-experts] Re: Section 3.7.2: is distance calculation correct for wildcards ?

From: Santiago Pericas-Geertsen <>
Date: Mon, 15 Apr 2013 12:08:09 -0400

On Apr 15, 2013, at 6:09 AM, Sergey Beryozkin <> wrote:

> Hi Santiago, all
> I'm not sure if it is a problem or not, I was not able to come up with the the case confirming it might be, but I'm typing it here in case someone can spot something,
> Basically, if we have 'text/xml vs text/*', then the distance is 1, and if we have 'text/* vs text/*' then the distance is 0 (as per the spec example, S(*/*;q=0.2, text/*;qs=0.9) = text/*;q=0.2;qs=0.9;d=1,
> ).
> As I said I was not able to come up with the example where it would make any unexpected difference, IMHO 'text/* vs text/*' should produce a distance 1, but if no one can see any issues with the distance 0 in this case then it works for me too :-)

 I don't see an issue. Wildcard comparison is for Accept and @Produces. Conceptually, identical types (even wildcard ones) should result in a distance of 0.

-- Santiago