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] [Commented] (CXF-5612) doGetAnnotatedMethod implementation issues
Date Thu, 13 Mar 2014 16:51:43 GMT

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

Sergey Beryozkin commented on CXF-5612:
---------------------------------------

It is actually correct, check Section 3.6 of the spec: "If a subclass or implementation method
has any JAX-RS annotations then all of the annotations on the
superclass or interface method are ignored", so the issue is invalid... Thanks

> doGetAnnotatedMethod implementation issues
> ------------------------------------------
>
>                 Key: CXF-5612
>                 URL: https://issues.apache.org/jira/browse/CXF-5612
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.9
>            Reporter: MIchail Nikolaev
>            Priority: Minor
>
> Check
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cxf/cxf-bundle-minimal/2.7.8/org/apache/cxf/jaxrs/utils/AnnotationUtils.java#223
> In case if service implementation class have annotation like *@PathParam* or *@BeanParam*
on method parameters (generated by IDE by default) - doGetAnnotatedMethod will stop attempts
to find interface method.
> I think it is requred to check for *@Path* too.
> So, interface:
> {code:java}
>     @Path("/some_service")
>     interface SomeService {
>         @Path("/type")
>         public String getSomething(@PathParam("type") String type);
>     }
> {code}
> Implementation:
> {code:java}
>     class SomeServiceImpl implements SomeService {
>         @Override
>         public String getSomething(@PathParam("type")  String type) {
>             return "cfx will not see this method";
>         }
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message