Jean-Philippe CLEMENT created ARIES-1241:
--------------------------------------------

             Summary: Blueprint does not find an argument which uses generics
                 Key: ARIES-1241
                 URL: https://issues.apache.org/jira/browse/ARIES-1241
             Project: Aries
          Issue Type: Bug
          Components: Blueprint
            Reporter: Jean-Philippe CLEMENT


Let's say an interface X<T> is defined.

A class A implements X<JPanel>. Another class B has a constructor with a single 
argument X<? extends Component>.

Calling B with A using regular Java code is correct. However, injecting A with 
B using blueprint fails with the error that no constructor is found matching A.

A workaround is to simply remove generics. Then Blueprint correctly injects A 
in B. Another workaround is to correct A definition to X<Component>. Then A can 
be injected into B using blueprint.

Java generics is based on type erasure so - once compiled - generics must not 
interfere at runtime.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to