Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-510

FireEventTest.testTypeVariableEventTypeFails() is not valid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.0.0.Alpha8, 1.2.10.Final
    • 1.2.8.Final, 1.2.9.Final
    • None
    • None

    Description

      The spec allows to infer the parameterized type of the event type from the specified type (e.g. Event injection point). See also CDI-256.

      public class Bar {
      
          @Inject
          private Event<Foo<? extends Number>> event;
      
          public <T extends Number> void fireWithTypeVariable() {
              event.fire(new Foo<T>()); // --> this is resolvable
          }
      }
      

      Attachments

        Activity

          People

            tremes1@redhat.com Tomas Remes
            mkouba@redhat.com Martin Kouba
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty