Weld
  1. Weld
  2. WELD-1441

Introduce NonProducibleInjectionTarget

    Details

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

      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.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: