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

Either ditch or fix @New

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.PRD
    • 1.0
    • Concepts, Contexts
    • None

    Description

      The specification of @New is currently not really usable. It is really only for creating injected but unmanaged and unintercepted instances of a class. But this usecase is weird and imo just not needed. If the class under construction is an 'old' Pojo (without @Inject, etc) then it doesn't need to get managed. And it also doesn't provide any benefit over just using new Pojo();
      Also you cannot @New classes which don't have a default ct.

      I just found no sane scenario where we cannot use a producer method instead.

      Can we simply deprecate @New?

      Attachments

        Activity

          People

            pmuiratbleepbleep Pete Muir (Inactive)
            struberg Mark Struberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: