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

Change name of the @Observes Reception attribute to "notified"

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Won't Do
    • Minor
    • None
    • 1.0
    • Javadoc and API
    • None
    • Low

    Description

      As of the CDI 1.0 specification, the name of the Reception attribute on @Observes is "receive". The patch release of the API (SP1) changes the name to "notifyObserver", so a change is already being considered. Therefore, I'd like to suggest a better name that would read more fluently. That name is "notified".

      Let us compare the three cases:

      1. @Observes(receive = IF_EXISTS)
      2. @Observes(notifyObserver = IF_EXISTS)
      3. @Observes(notified = IF_EXISTS)

      Of the three, notifyObserver breaks the flow of the sentence the most. On the other hand, notified reads nicely, including with the TransactionPhase attribute included:

      @Observes(notified = IF_EXISTS, during = TransactionPhase.AFTER_SUCCESS)

      Attachments

        Activity

          People

            pmuiratbleepbleep Pete Muir (Inactive)
            dan.j.allen Dan Allen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: