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

Consider adding ObserverMethod.notify() method which also accepts EventMetadata

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 2.0 .Final
    • None
    • Events
    • None

    Description

      // Make the original method also default so that new impls don't need to implement two methods
      default void notify(T event) {
        // No-op 
      }
      // The container should always call this method...
      default void notify(T event, EventMetadata metadata) {
        notify(event);
      }
      

      This should not break existing implementations. The truth is a custom impl will not be forced to implement any notify() method. But I think the benefits are worth it.

      Attachments

        Issue Links

          Activity

            People

              mkouba@redhat.com Martin Kouba
              mkouba@redhat.com Martin Kouba
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: