jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Section 3.7.2: is distance calculation correct for wildcards ?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Mon, 15 Apr 2013 11:09:12 +0100

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

Thanks, Sergey