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

JSON Jackson does not handle resource returning CompletionStage<X>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.11, 3.3.4
    • 3.3.5, 3.2.12, 3.4.0
    • JAX-RS
    • None
    • Unknown

    Description

      Hello,

       

      While testing to integrate the CXF Microprofile implementation in order to perform asynchronous client calls using client proxies, I encounter the Exception raised by the json provider due to the returned generic type being CompletionStage.

       

      It is clear that MicroProfileClientProxyImpl#getReturnType(Method, Message) is behaving correctly regarding the returnType, however inside the ClientProxyImpl#handleResponse(Message, Class<?>) we also compute the genericType based on the method.getGenericReturnType() which is of type CompletionStage, therefore the provider is not able to deserialize the String correctly as internally it uses the genericType.

      Do you think it could be possible to update the InjectionUtils.processGenericTypeIfNeeded  to add cases for CompletionStage in order to change the genericType returned in this case ?

       

       

      Attachments

        1. exception.txt
          7 kB
          Baptiste AIGLIN
        2. cxf-mp-reproducer.zip
          5 kB
          Baptiste AIGLIN

        Activity

          People

            reta Andriy Redko
            baiglin Baptiste AIGLIN
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: