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

Guillaume Nodet resolved ARIES-672.
-----------------------------------

    Resolution: Duplicate
      Assignee: Guillaume Nodet
    
> Erroneous "no type converter available to convert from type" exception for 
> parameterized types
> ----------------------------------------------------------------------------------------------
>
>                 Key: ARIES-672
>                 URL: https://issues.apache.org/jira/browse/ARIES-672
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: 0.3
>            Reporter: Stephen Saucier
>            Assignee: Guillaume Nodet
>
> org.apache.aries.blueprint.container.AggregateConverter.convert(Object, 
> ReifiedType) throws an Exception when the ReifiedType has type parameters. 
> The issue is in the "isAssignable" function line 416 (of version 0.3) where 
> there is a check that "target.size() == 0". This condition can never be true 
> for parameterized types, so it is assumed that the object is not assignable.
> For example, consider the following
> public interface Foo<T> {
>     ...
> }
> public interface Bar {
>     ...
> }
> public class ExtendsFoo implements Foo<Bar> {
>     ...
> }
> public class Baz {
>     public void setFoo(Foo<Bar> foo) {
>         ...
>     }
> }
> wiring of an instance of ExtendsFoo to Baz fails with the exception message 
> "no type converter available to convert from type: ExtendsFoo to the required 
> type: Foo<Bar>"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to