[ 
https://issues.apache.org/jira/browse/DOSGI-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michal Kutyla updated DOSGI-95:
-------------------------------

    Description: 
The solution applied to the original issue is not fully correct.

It will work if service interface is extended by other INTERFACE(so does in 
example with ArrayList and Collection). 
It won't work if service interface is implemented by super CLASS.
I couldn't find example in JDK so imagine that you have:

class A extends B {...}
class B implements C {...}
interface C {...}

Now, when you call Classutils.getInterfaceClass(new A(), "C") it will return 
null.

A workaround for this issue is to declare:
class A extends B implements C {...}.

  was:
The solution applied to original issue is not fully correct.

It will work if service interface is extended by other INTERFACE(so does in 
example with ArrayList and Collection). 
It won't work if service interface is implemented by super CLASS.
I couldn't find example in JDK so imagine that you have:

class A extends B {...}
class B implements C {...}
interface C {...}

Now, when you call Classutils.getInterfaceClass(new A(), "C") it will return 
null.

A workaround for this issue is to declare:
class A extends B implements C {...}.


> CLONE - org.apache.cxf.dosgi.dsw.ClassUtils#getInterfaceClass() method should 
> search through super class interfaces too
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DOSGI-95
>                 URL: https://issues.apache.org/jira/browse/DOSGI-95
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>         Environment: any
>            Reporter: Michal Kutyla
>            Assignee: David Bosschaert
>            Priority: Minor
>             Fix For: 1.2
>
>
> The solution applied to the original issue is not fully correct.
> It will work if service interface is extended by other INTERFACE(so does in 
> example with ArrayList and Collection). 
> It won't work if service interface is implemented by super CLASS.
> I couldn't find example in JDK so imagine that you have:
> class A extends B {...}
> class B implements C {...}
> interface C {...}
> Now, when you call Classutils.getInterfaceClass(new A(), "C") it will return 
> null.
> A workaround for this issue is to declare:
> class A extends B implements C {...}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to