aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <>
Subject [jira] [Closed] (ARIES-1241) Blueprint does not find an argument which uses generics
Date Wed, 31 Jan 2018 08:30:00 GMT


Guillaume Nodet closed ARIES-1241.
    Resolution: Duplicate

> Blueprint does not find an argument which uses generics
> -------------------------------------------------------
>                 Key: ARIES-1241
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>            Reporter: Jean-Philippe CLEMENT
>            Priority: Major
> 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

View raw message