[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4173) Wicket instrumentation results in incorrect disinjection when invoking superclass methods from a subclass constructor

Clint Popetz (JIRA) jira-events at lists.jboss.org
Wed May 13 17:49:46 EDT 2009


Wicket instrumentation results in incorrect disinjection when invoking superclass methods from a subclass constructor
---------------------------------------------------------------------------------------------------------------------

                 Key: JBSEAM-4173
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4173
             Project: Seam
          Issue Type: Bug
          Components: Wicket
            Reporter: Clint Popetz
            Assignee: Clint Popetz
             Fix For: 2.1.2


Currently a WicketHandler instance is created for each class in a hierarchy, which means we don't maintain the reentrancy count correctly for situations like 

class A { 
 @In Dependent dep; 
  A() { }
   method() {  }
}

class B extends A { 
    B() { 
     super();
     method();
     dep.method();  //NPE because dep has been disinjected
   }  
}

This only exhibits in constructors because otherwise the getHandler() call will always find the most derived handler instance.  

The solution is to ensure that there is only one handler, living in the least-derived instrumented parent.  This means that instrumentation has to happen recursively, so that instrumenting child classes can make reference to the instrumented parent's handler field.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list