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

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

    XMLWordPrintable

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<?>> {
      //...
      }
      

      Attachments

        Issue Links

          Activity

            People

              asabotdu@redhat.com Antoine Sabot-Durand (Inactive)
              niematojaktomasz Tomasz Krakowiak (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: