1 Reply Latest reply on Jan 2, 2007 11:25 AM by andrew.rw.robinson

    Seam 1.1 nullifies member variables when it shouldn't

    andrew.rw.robinson

      A circular call in Seam 1.1 causes null references to injected values.

      Circular call use case:

      @Name("a")
      public class A {
      @In(create=true)
      private B b;
      
      public void doSomething(ActionEvent evt) {
      b.thisWorks();
      b.nullPointerHere();
      }
      
      public void dummyMethod() {}


      @Name("b")
      public class B {
      @In(create=true)
      private C c;
      
      public void thisWorks() {
      c.callMe();
      }
      
      public void nullPointerHere() {}


      @Name("c")
      public class C {
      @In(create=true)
      private A a;
      
      public void callMe() {
      a.dummyMethod(); // this call causes A's member variables
      // to be set to "null"
      }


      There is no reason IMO that this should not be allowed. Seam incorrectly removes A's member variables despite the fact that there is an actively running method on the thread inside of A.