Currently injected collection types supported are Set and List, but not Collection.
So something like this is currently not possible:
@Inject
public MyCtor(Collection<MyComponent> myComponents) {
...
Despite I may have Set or List injected. We may want to broaden and recognize these situations as Java would allow passing of Set or List into this ctor.
Currently injected collection types supported are
Set
andList
, but notCollection
.So something like this is currently not possible:
Despite I may have
Set
orList
injected. We may want to broaden and recognize these situations as Java would allow passing ofSet
orList
into this ctor.PS: This just came to my attention, as for example former Aether (Maven Resolver) is full of these: https://github.com/apache/maven-resolver/blob/maven-resolver-1.9.14/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultTransporterProvider.java#L58
(injects Set, only to pass to method using Collection and primate member is Collection as well).