Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-502

Clarify "contains" meaning in "Legal bean types" specification.

    Details

      Description

      CDI 1.1, section 2.2.1. Legal bean types says:

      A parameterized type that contains a wildcard type parameter is not a legal bean type.

      Does it means direct containment or deep/recursive containment?

      I understand this is clearly illegal:

      @Produces
      List<?> produceList(){
      //...
      }
      

      But, are those two bean definitions legal:

      @Produces
      List<Optional<?>> produceList(){
      //...
      }
      
      // Bean types: MyList, List<Optional<?>>, Object
      // or
      // Bean types: MyList, Object
      @Dependent
      MyList extends List<Optional<?>> {
      //...
      }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  antoinesabot-durand Antoine Sabot-Durand
                  Reporter:
                  niematojaktomasz Tomasz Krakowiak
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated: