[ https://issues.apache.org/jira/browse/CXF-7527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16207638#comment-16207638 ]
Sergey Beryozkin commented on CXF-7527: --------------------------------------- What confuses me a bit is that the docs clearly state that both the sub-resource locator and sub-resource method are included, http://docs.oracle.com/javaee/7/api/javax/ws/rs/core/UriInfo.html#getMatchedURIs-- "Each entry is a relative URI that matched a resource class, a sub-resource method or a sub-resource locator" So CXF will add an entry when the locator is reached, and then when the actual subresource resource method is reached. The doc example shows a single URI though, "/foo/bar", I wonder if it is because the duplicates which follow each other are expected to be collapsed or that a sub-resource locator should not be included (which would contradict to the docs). How would RI react to the case where we have "/foo/bar/sub" and BarResource GET method would have "sub", would it have "/foo" and "/foo/bar/sub" only (thus skipping the subresource locator) or "/foo", "/foo/bar/" and "/foo/bar/sub" ? > 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)