Project: AspectJ
Bug 51929 Advice calling protected super method causing java.lang.VerifyError 'Bad access to protected data'
Reported: 2004-02-12 21:13:29 | Status: resolved fixed

A java.lang.VerifyError is thrown at runtime complaining about 'Bad access to protected data' when advice, on a sub-aspect, that calls a protected method, on the super-aspect, is woven into a class. However another call to the same method woven into the same class but due to advice declared in the super-aspect works fine. The aspects were woven into precompiled (by sun's 1.4 javac) classes. The verify error occurs under both sun's 1.4 and blackdowns 1.3 VMs, and presumably all VMs. Workaround: Making the protected method public fixes the verify error. A test case is available in CVS: tests/bugs/protectedvf/... tests/ajcTestFailing.xml

Files changed in fix:
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AccessForInlineVisitor.java org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InlineAccessFieldBinding.java tests/bugs/protectedvf/main/Driver.java