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

Disposer method doesnt detect Producer field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.0.Alpha2
    • 4.3.0.Alpha1
    • cdi
    • None

      This applies for CDI 1.1 and 1.2 which allows Disposer method to accept Producer field.

      public class B1 {
      	
      	@Produces EntityManager em;
      	
      	public void test(@Disposes EntityManager em){
      		//do smt
      	}
      

      This code results in error "There is no producer method declared by the (same) bean class that is assignable to the disposed parameter of a disposer method [JSR-346 ยง3.5.3]"

      CDI 1.1 and 1.2 allows also producer filed (see section 3.5)

            scabanovich Viacheslav Kabanovich (Inactive)
            rawagner@redhat.com Rastislav Wagner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: