You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2021/09/01 15:28:00 UTC

[jira] [Resolved] (CXF-8578) Bridge methods for covariant return types cannot be invoked on client proxies

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

Andriy Redko resolved CXF-8578.
-------------------------------
    Resolution: Fixed

> Bridge methods for covariant return types cannot be invoked on client proxies
> -----------------------------------------------------------------------------
>
>                 Key: CXF-8578
>                 URL: https://issues.apache.org/jira/browse/CXF-8578
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.3.8, 3.4.4
>            Reporter: Roland Elek
>            Assignee: Andriy Redko
>            Priority: Major
>             Fix For: 3.3.12, 3.4.5, 3.5.0
>
>         Attachments: cxf-8578-demo.tar.gz
>
>
> For a method override using covariant return types, the Java compiler generates a bridge method that has the same name and parameter types as the real one. If a resource class has such an override, and inherits JAX-RS annotations from an interface it implements, the two methods will correspond to the same annotated method.
> Because of this, as implemented in CXF-7670, the real method is mapped to the operation defined by the annotations, while the bridge method is ignored. This causes a javax.ws.rs.ProcessingException when trying to invoke it on client proxies built from the concrete class. This kind of invocation happens when the proxy is upcast.
> I already have a fix for this on top of CXF 3.3.8. The pull request is in progress.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)