[cdi-dev] [JBoss JIRA] (CDI-502) Clarify "contains" meaning in "Legal bean types" specification.
Antoine Sabot-Durand (JIRA)
issues at jboss.org
Mon Jun 29 11:46:05 EDT 2015
[ https://issues.jboss.org/browse/CDI-502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Sabot-Durand updated CDI-502:
-------------------------------------
Fix Version/s: 2.0-EDR1
> Clarify "contains" meaning in "Legal bean types" specification.
> ---------------------------------------------------------------
>
> Key: CDI-502
> URL: https://issues.jboss.org/browse/CDI-502
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Beans, Inheritance and Specialization
> Reporter: Tomasz Krakowiak
> Fix For: 2.0 (discussion)
>
>
> CDI 1.1, section 2.2.1. Legal bean types says:
> {quote}
> A parameterized type that contains a wildcard type parameter is not a legal bean type.
> {quote}
> Does it means direct containment or deep/recursive containment?
> I understand this is clearly illegal:
> {code}
> @Produces
> List<?> produceList(){
> //...
> }
> {code}
> But, are those two bean definitions legal:
> {code}
> @Produces
> List<Optional<?>> produceList(){
> //...
> }
> {code}
> {code}
> // Bean types: MyList, List<Optional<?>>, Object
> // or
> // Bean types: MyList, Object
> @Dependent
> MyList extends List<Optional<?>> {
> //...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the cdi-dev
mailing list