[
https://issues.apache.org/jira/browse/CXF-5612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
MIchail Nikolaev updated CXF-5612:
----------------------------------
Description:
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:
{quote}
@Path("/some_service")
interface SomeService {
@Path("/type")
public String getSomething(@PathParam("type") String type);
}
{quote}
Implementation:
{quote}
class SomeServiceImpl implements SomeService {
@Override
public String getSomething(@PathParam("type") String type) {
return "cfx will not see this method";
}
}
{quote}
was:
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:
@Path("/some_service")
interface SomeService {
@Path("/type")
public String getSomething(@PathParam("type") String type);
}
Implementation:
class SomeServiceImpl implements SomeService {
@Override
public String getSomething(@PathParam("type") String type) {
return "cfx will not see this method";
}
}
> 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:
> {quote}
> @Path("/some_service")
> interface SomeService {
> @Path("/type")
> public String getSomething(@PathParam("type") String type);
> }
> {quote}
> Implementation:
> {quote}
> class SomeServiceImpl implements SomeService {
> @Override
> public String getSomething(@PathParam("type") String type) {
> return "cfx will not see this method";
> }
> }
> {quote}
--
This message was sent by Atlassian JIRA
(v6.2#6252)