Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9723

Injection points declared in producer methods should be validated as injection points of the producer but not as injections of the class bean

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M4
    • 3.3.0.M3
    • cdi
    • None

      EXECUTE: Create a CDI project.
      EXECUTE: Create the following class:

      @ApplicationScoped
      public class ProducerWInjections {
      
          @Produces
          public Test produce(InjectionPoint ip) {
          	return null;
          }
      
          public static class Test {
          }
      }
      

      EXECUTE: Build the project.
      FAILURE: InjectionPoint ip is marked as an error "Bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default [JSR-299 ยง5.5.7]"
      That's not correct since the injection points belongs to the producer method bean which scoped correctly. We should not validate such a injection against a bean class.

            alexeykazakov Alexey Kazakov
            alexeykazakov Alexey Kazakov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: