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 2017/01/19 10:10:26 UTC

[jira] [Commented] (CXF-7218) @PathParam on both class and interface disables method

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

Sergey Beryozkin commented on CXF-7218:
---------------------------------------

Hi, this is a regularly created issue which happens to be an invalid one. JAX-RS Annotation inheritance works only if none of the JAX-RS annotations exist on the current method. Please check the spec.
Sergey

> @PathParam on both class and interface disables method
> ------------------------------------------------------
>
>                 Key: CXF-7218
>                 URL: https://issues.apache.org/jira/browse/CXF-7218
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.9
>            Reporter: Dmitry Murashenkov
>
> I have jax rs method in interface:
>     @GET
>     @Path("/role/{id}")
>     RoleDTO getRole(@PathParam("id") String id);
> And implementation:
>     @Override
>     public RoleDTO getRole(String id)
> This works well, but if I leave annotation on the implementation method:
>  
>     @Override
>     public RoleDTO getRole(@PathParam("id") String id)
> Then I get 405 method not allowed, from viewing JAXRSUtils.findTargetMethod I can see that resource.getMethodDispatcher().getOperationResourceInfos() doesn't return this method in this case.
> Seems to be a bug.
> Note that IntelliJ Idea IDE adds argument annotations to overriden methods by default (if code is generated via IDE) and that makes it more important issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)