cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Mayamsin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5432) JAX-RS resources finding fails in case @Path is non-unique
Date Tue, 03 Dec 2013 17:32:37 GMT

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

Valentin Mayamsin commented on CXF-5432:
----------------------------------------

Can it at least warn the programmer about this implementation limitation? This took quite
a bit of time to debug, it would save a lot of time for others.

> JAX-RS resources finding fails in case @Path is non-unique
> ----------------------------------------------------------
>
>                 Key: CXF-5432
>                 URL: https://issues.apache.org/jira/browse/CXF-5432
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.6
>            Reporter: Valentin Mayamsin
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>
> Let's say I have two resources:
> {code}
> @Path("resource")
> class ResourceOne {
>     @Path("one")
>     String getSomething();
> }
> @Path("resource")
> class ResourceTwo {
>     @Path("two")
>     String doSomething();
> }
> {code}
> So there are two URIs to access them:
> resource/one
> resource/two
> With the current implementation one of them would fail.
> The reason is org.apache.cxf.jaxrs.model.ClassResourceInfoComparator assumes @Path values
are unique which is not necessarily true.
> Workaround is to make @Path value unique for root resources.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message