cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7147) Unable to register a generic _InvocationCallback<Object>_ when using the async proxy client API in JAX-RS
Date Tue, 22 Nov 2016 09:34:58 GMT

    [ https://issues.apache.org/jira/browse/CXF-7147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15686205#comment-15686205
] 

ASF GitHub Bot commented on CXF-7147:
-------------------------------------

GitHub user johnpoth opened a pull request:

    https://github.com/apache/cxf/pull/204

    [CXF-7147] Allow generic invocation callback for JAX-RS async proxy c…

    …lients
    
    https://issues.apache.org/jira/browse/CXF-7147

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/johnpoth/cxf CXF-7147

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/204.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #204
    
----
commit 0f3080d68532713e78b38f46ab302d2670f8b749
Author: jpoth <poth.john@gmail.com>
Date:   2016-11-22T09:33:43Z

    [CXF-7147] Allow generic invocation callback for JAX-RS async proxy clients

----


> Unable to register a generic _InvocationCallback<Object>_ when using the async
proxy client API in JAX-RS
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-7147
>                 URL: https://issues.apache.org/jira/browse/CXF-7147
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: John Poth
>
> It is currently impossible to register a generic _InvocationCallback<Object>_ when
invoking a method that returns void. This is due to a [check|https://github.com/apache/cxf/blob/master/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java#L797]
that isn't satisfied when the _methodReturnType_ is void. I propose to add the following case
> {code}
> Object.class == callbackRespClass
> {code}
> And let the user handle the logic.
>  I also propose to remove the condition
> {code}
> Response.class == callbackRespClass
> {code}
> Which will lead to failure when [casting|https://github.com/apache/cxf/blob/master/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JaxrsClientCallback.java#L76]
to a return type upon completion. I will provide a PR.
> [~sergey_beryozkin] sorry for the confusion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message