cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-6450) Bad handling of JAX-RS generic interfaces
Date Thu, 23 Jul 2015 10:32:04 GMT


Sergey Beryozkin commented on CXF-6450:

Yes, the variation where an extra interface is interposed does not work (this interposition
which is what I referred to when talking about the complexity) - the test is temp disabled,
the case where GenericBookInterface is directly implemented works:

Few notes:
- you can create proxies from concrete classes (add cglib nodep)
- the proxy code does not work with GenericBookInterface only because it itself has no typed
information, hence the test which is still enabled does use WebClient + JAXRS2.0 GenericType;
(GenericBookServiceInterface is fine though for proxies...)

There's indeed a problem with the CXF JAX-RS code introspecting the annotated methods which
are deeply inherited (more than 1 level) from generic interfaces. I'm not sure you'd agree
but I think a reasonable workaround can be found. The patch looks good but the release is
coming very shortly and I'm cautious about merging it right now. I'll experiment a bit but
most likely it would be merged into 3.1.3-SNAPSHOT

> Bad handling of JAX-RS generic interfaces
> -----------------------------------------
>                 Key: CXF-6450
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.1.0
>            Reporter: Vladimir Kulev
>         Attachments: InjectionUtils.patch
> Here is a simple example of the code which does *not* work as intended:
> {code:java}
> interface GenericInterface<A> {
>     @GET
>     List<A> list();
> }
> interface ServiceInterface extends GenericInterface<String> {}
> public static class TestService implements ServiceInterface {
>     @Override
>     public List<String> list() {
>         return new ArrayList<>();
>     }
> }
> {code}
> I have found that the shape of {{InjectionUtils}} is pretty bad, so please accept this
patch slightly improving the situation.

This message was sent by Atlassian JIRA

View raw message