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

Introduce NonProducibleInjectionTarget

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 2.0.2.Final
    • 2.0.1.Final
    • None
    • None

      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.

            rhn-engineering-jharting Jozef Hartinger
            rhn-engineering-jharting Jozef Hartinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: