]
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: