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

[jsr339-experts] Re: Matching algorithm doesn't recurse back on Locators

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 17 May 2013 09:35:25 +0100

Hi Bill
On 17/05/13 04:41, Bill Burke wrote:
> Let me give you an example:
>
> Given this request:
>
> OPTIONS /sub
>
> This will match:
>
> @Path("/")
> class Resource {
>
> @Path("{id}")
> public Locator locator() { return new Locator();}
>
> }
>
> class Locator {
>
> @OPTIONS
> public String options() { return "OK"; }
> }
>
> But this won't match:
>
> @Path("/")
> class Resource {
>
> @GET
> @Path("sub")
> public String get() { return "OK"; }
>
> @Path("{id}")
> public Locator locator() { return new Locator();}
>
> }
>
Seems to me it will too. @GET method is selected only if no @OPTIONS is
available and in this case it is available.

Cheers, Sergey

>
>
>
>
> On 5/16/2013 10:38 PM, Bill Burke wrote:
>> Section 3.7
>>
>> IMO, Step 3(a) should jump back to 2(i) before throwing an exception.
>> Maybe its too late to change this. This would allow the base resource
>> to override the locator with more specific mappings otherwise you can't
>> do this.
>>
>> Bill
>>
>