Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1441

Introduce NonProducibleInjectionTarget

    Details

    • Type: Task
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.1.Final
    • Fix Version/s: 2.0.2.Final
    • Component/s: None
    • Labels:
      None

      Description

      There are multiple situations when an InjectionTarget is created by an extension for a class that does not match bean class requirements. For example:

      • abstract classes (Solder)
      • non-static inner classes (cdi-wicket)
      • classes with no appropriate constructor

      Creating an InjectionTarget for such a class is OK as long as it is only ever used for injecting existing instances, not for producing instances.

      We should introduce an InjectionTarget implementation capable of doing this and also log a warning each time it is created. If the application attempts to call produce() on such InjectionTarget, the call should fail with exception.

        Gliffy Diagrams

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                jharting Jozef Hartinger
                Reporter:
                jharting Jozef Hartinger
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development