You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2016/02/21 12:43:18 UTC
[jira] [Updated] (CXF-6793) InvocationCallback doesn't try to get
response class type
[ https://issues.apache.org/jira/browse/CXF-6793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau updated CXF-6793:
------------------------------------
Description:
in org.apache.cxf.jaxrs.client.WebClient#doInvokeAsyncCallback the webclient could try to find the response class if not there.
would avoid to give a null type the providers can't use to do what they need to
Code can be if respClass is null and callback is not null something like:
{code}
// in real code filter interfaces and dont access them directly by index
ParameterizedType.class.cast(callback.getClass().getGenericInterfaces()[0]).getActualTypeArguments()[0]
{code}
edit: digging a bit seems org.apache.cxf.jaxrs.utils.InjectionUtils#getSuperType just doesn't default to anything and in case of TypeVariable unbounded is not able to default to Object so if bound is really Object it fails
was:
in org.apache.cxf.jaxrs.client.WebClient#doInvokeAsyncCallback the webclient could try to find the response class if not there.
would avoid to give a null type the providers can't use to do what they need to
Code can be if respClass is null and callback is not null something like:
{code}
// in real code filter interfaces and dont access them directly by index
ParameterizedType.class.cast(callback.getClass().getGenericInterfaces()[0]).getActualTypeArguments()[0]
{code}
edit: digging a bit seems org.apache.cxf.jaxrs.utils.InjectionUtils#getSuperType just doesn't default to anything and in case of TypeVariable unbounded is not able to default to Object
> InvocationCallback doesn't try to get response class type
> ---------------------------------------------------------
>
> Key: CXF-6793
> URL: https://issues.apache.org/jira/browse/CXF-6793
> Project: CXF
> Issue Type: Bug
> Affects Versions: 3.1.5
> Reporter: Romain Manni-Bucau
>
> in org.apache.cxf.jaxrs.client.WebClient#doInvokeAsyncCallback the webclient could try to find the response class if not there.
> would avoid to give a null type the providers can't use to do what they need to
> Code can be if respClass is null and callback is not null something like:
> {code}
> // in real code filter interfaces and dont access them directly by index
> ParameterizedType.class.cast(callback.getClass().getGenericInterfaces()[0]).getActualTypeArguments()[0]
> {code}
> edit: digging a bit seems org.apache.cxf.jaxrs.utils.InjectionUtils#getSuperType just doesn't default to anything and in case of TypeVariable unbounded is not able to default to Object so if bound is really Object it fails
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)