[jboss-jira] [JBoss JIRA] Closed: (JBAOP-722) Wrapper Generated for Inner Class Constructor May Not Invoke the Interceptor Chain
Flavia Rainone (JIRA)
jira-events at lists.jboss.org
Fri May 8 09:30:46 EDT 2009
[ https://jira.jboss.org/jira/browse/JBAOP-722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flavia Rainone closed JBAOP-722.
--------------------------------
Resolution: Done
> Wrapper Generated for Inner Class Constructor May Not Invoke the Interceptor Chain
> ----------------------------------------------------------------------------------
>
> Key: JBAOP-722
> URL: https://jira.jboss.org/jira/browse/JBAOP-722
> Project: JBoss AOP
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.1.0.GA
> Reporter: Flavia Rainone
> Assignee: Flavia Rainone
> Fix For: 2.1.1.GA
>
>
> When the default constructor of an inner class is invoked by the external class, and this inner class lacks the constructor declaration, the JVM compiles this as a call to the constructor that receives an anonymous class as a parameter.
> Take a look at the sample below:
> public class ExternalClass
> {
> public void invokeIt() { new Pojo();}
> private static class Pojo {}
> }
> Wen this code is compiled, this is what the JVM will generate:
> public class ExternalClass
> {
> public void invokeIt() {new Pojo(null);}
>
> private static class Pojo
> {
> public Pojo() {}
> public Pojo (ExternalClass$1 ec) {}
> }
> If the execution of the default constructor needs to be intercepted on the scenario above, JBoss AOP will get confused with the constructor stuff, and the interception won't take place.. JBoss AOP will generate an empty wrapper for the Pojo(ExternalClass$1) constructor, and a wrapper that delegates to the interceptor chain for the default constructor. But, given that the first constructor is invoked, no interception will take place.
--
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 jboss-jira
mailing list