[jboss-jira] [JBoss JIRA] Commented: (JBAOP-803) methodInfo from based class not copied over after invoking ((Advised) obj)._getInstanceAdvisor(), resulting NPE when subclass calls super.someOverridden method
Rick Dong (JIRA)
jira-events at lists.jboss.org
Sat Nov 20 01:41:53 EST 2010
[ https://jira.jboss.org/browse/JBAOP-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564440#comment-12564440 ]
Rick Dong commented on JBAOP-803:
---------------------------------
can we get this fixed in the next release?
> methodInfo from based class not copied over after invoking ((Advised) obj)._getInstanceAdvisor(), resulting NPE when subclass calls super.someOverridden method
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAOP-803
> URL: https://jira.jboss.org/browse/JBAOP-803
> Project: JBoss AOP
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Rick Dong
>
> this seems to be a bug in the copying process in GeneratedAdvisorInstrumentor.addInstanceAdvisorWrappers
> line 771 : String code = infoName + " = super.copyInfoFromClassAdvisor(((" + genadvisor.getName() + ")" + clazz.getName() + "." + GET_CLASS_ADVISOR + "())." + infoName + ");";
> this should've been:
> String code = "(("+superAdvisor.getName()+")this)."+infoName + " = super.copyInfoFromClassAdvisor(((" + superAdvisor.getName() + ")" + superClass.getName() + "." + GET_CLASS_ADVISOR + "())." + infoName + ");";
> the added part at the front makes sure to cast to the current class in case the subclass declared fields with same name resulted from having same method signature
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list