You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2011/06/21 13:37:47 UTC

[jira] [Resolved] (CXF-3608) CXF JAX-RS selection algorithm always prefers resource methods to subresource locators

     [ https://issues.apache.org/jira/browse/CXF-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-3608.
-----------------------------------

    Resolution: Fixed

> CXF JAX-RS selection algorithm always prefers resource methods to subresource locators
> --------------------------------------------------------------------------------------
>
>                 Key: CXF-3608
>                 URL: https://issues.apache.org/jira/browse/CXF-3608
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
>            Assignee: Sergey Beryozkin
>             Fix For: 2.3.6, 2.4.2, 2.5
>
>
> JAX-RS 1.1 spec says:
> Sort E using the number of literal characters in each member as the primary key (descending order), the number of capturing groups as a secondary key (descending order), the number of capturing groups with non-default regular expressions (i.e. not '([^ /]+?)') as the tertiary key (descending order), and the source of each member as quaternary key sorting those derived from Tmethod ahead of those derived from Tlocator. 
> At the moment CXF JAX-RS using the "the source of each member" criteria as the primary key, thus
> given
> @Path("/")
> public Resource {
>     @Path("somepath") 
>     Subresource getSub() {}
>     @GET @Path("{id}")
>     Book get(@PathParam("id") String id) {} 
> }
> get() method will always be preferred even though a subresource locator has a more specific path expression

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira