]
Kabir Khan reassigned JBAOP-660:
--------------------------------
Assignee: Flavia Rainone
Flavia can you look when Jason provides more info?
VerifyError on Illegal bytecode generated with cross-package
inheritence
------------------------------------------------------------------------
Key: JBAOP-660
URL:
https://jira.jboss.org/jira/browse/JBAOP-660
Project: JBoss AOP
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 2.0.0.alpha1, 2.0.0.alpha2, 2.0.0.alpha3, 2.0.0.alpha4,
2.0.0.alpha5, 2.0.0.alpha6, 2.0.0.beta1, 2.0.0.beta2, 2.0.0.CR1, 2.0.0.CR2, 2.0.0.CR3,
2.0.0.CR4, 2.0.0.CR5, 2.0.0.CR6, 2.0.0.CR7, 2.0.0.CR8, 2.0.0.CR9, 2.0.0.CR10, 2.0.0.CR11,
2.0.0.CR12, 2.0.0.CR13, 2.0.0.CR14, 2.0.0.CR15, 2.0.0.CR16, 2.0.0.CR17, 2.0.0.CR18
Reporter: Jason T. Greene
Assignee: Flavia Rainone
Priority: Critical
Fix For: 2.0.0.GA
If two classes in an inheritance tree are both weaved, and the classes are in different
packages, the generated adviser classes contain bytecode that violates the protected
member access restrictions:
33: getfield #617; //Field two/Bar$BarInstanceAdvisor.parent:Ltwo/Bar$BarAdvisor;
36: getfield #619; //Field
one/Foo$FooAdvisor.aop$FieldInfo_w_blah:Lorg/jboss/aop/FieldInfo;
A protected member can only be accessed on an object instance that is the same type or a
subtype of the code touching the protected field, unless both classes are in the same
package, in which case normal package access rules supersede.
Adding a method call indirection, or making the fields public would be possible
solutions.
To reproduce, just create two small classes in different packages where one inherits the
other, and both are weaved. Then call Advised._getInstanceAdvisor(), which will attempt to
load the class, resulting in a VerifyError
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: