11 Replies Latest reply on Dec 19, 2013 10:34 AM by friso_caci

    CDI Event variance

    jmfaerman
      Is it possible to use type variance in CDI events?

      - Suppose i have a root event type MyEvent and subclass DummyEvent
      - My goal is to process a list of events received from a remote source ( List<? extends MyEvent> )

      How can i do this?

      If i loop through the collection calling fire() on each event, it will trigger only @Observes MyEvent, not @Observes DummyEvent...