[ 
https://issues.apache.org/jira/browse/CXF-7527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16207795#comment-16207795
 ] 

Lenoire commented on CXF-7527:
------------------------------

Yes, that's at least my understanding of the terminology used in JAXRS: 
BarResource.getBar is not a subresource method. Therefore, there is no 
contraction between the doc and the example given for method 
{{UriInfo.getMatchedURIs()}}.

I don't know what the RI is actually doing, but IMHO, requesting GET 
/foo/bar/sub should give: foo/bar/sub, foo/bar, foo. Because as specified by 
the doc "Each entry is a relative URI that matched a resource class, a 
sub-resource method or a sub-resource locator":
* "foo/bar/sub" => matching the sub-resource method BarResource.getSub()
* "foo/bar" => matching the sub-resource locator FooResource.getBarResource()
* "foo" => matching the resource class FooResource

My 2cts


> JAXRS UriInfo.getMatchedUris does return matched URIs twice for sub resources
> -----------------------------------------------------------------------------
>
>                 Key: CXF-7527
>                 URL: https://issues.apache.org/jira/browse/CXF-7527
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.1.12
>            Reporter: Lenoire
>         Attachments: uriinfo-issues.jar
>
>
> Invoking method {{UriInfo.getMatchedURIs()}} return matched resource URI 
> twice when invoked from SubResource method.
> See attachment for a junit test reproducing the issue (=> 
> {{testMatchedUrisFromSubResource()}}) 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to