Baptiste AIGLIN created CXF-8179:
------------------------------------

             Summary: JSON Jackson does not handle resource returning 
CompletionStage<X>
                 Key: CXF-8179
                 URL: https://issues.apache.org/jira/browse/CXF-8179
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 3.3.4
            Reporter: Baptiste AIGLIN
         Attachments: cxf-mp-reproducer.zip, exception.txt

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 ?

 

 



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

Reply via email to