cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-5066) Annotation inheritance does not work if a non JAX-RS annotation is present on an implementation method
Date Thu, 13 Jun 2013 08:58:21 GMT

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

Sergey Beryozkin resolved CXF-5066.
-----------------------------------

    Resolution: Not A Problem
      Assignee: Sergey Beryozkin
    
> Annotation inheritance does not work if a non JAX-RS annotation is present on an implementation
method
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-5066
>                 URL: https://issues.apache.org/jira/browse/CXF-5066
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.5
>            Reporter: Simon Gerber
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>
> Consider an annotated interface and implementation as follows
> {noformat}
> @Path("example")
> public interface Example {
>      
>     @GET
>     ExampleResponse get();
> }
> public class ExampleImpl implements Example {
>     @Override
>     public ExampleResponse get() { // ... }
> }
> {noformat}
> The documentation states that 'most JAX-RS annotations can be inherited from the superclass
or interface'. However in the above example CXF will reject this resource as ResourceUtils.createClassResourceInfo()
fails to find any dispatcher methods. 
> The reason for this is that AnnotationUtils.doGetAnnotatedMethod() returns the concrete
class method because it has an Override annotation on it. Therefore it does not find the method
annotation.
> The workaround is to remove the Override annotation - however since many IDEs (such as
Eclipse) are configured to add this by default it could be considered a case where user expectations
will not be met. This caveat was not documented anywhere and it required debugging into the
CXF source code to isolate the issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message