Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8578

Bridge methods for covariant return types cannot be invoked on client proxies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.8, 3.4.4
    • 3.5.0, 3.3.12, 3.4.5
    • JAX-RS
    • None
    • Unknown

    Description

      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.

      Attachments

        1. cxf-8578-demo.tar.gz
          6 kB
          Roland Elek

        Activity

          People

            reta Andriy Redko
            relek Roland Elek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: