Project: AspectJ
Bug 77269 Advice on inner classes not show in Outline view or gutter
Reported: 2004-10-29 06:25:28 | Status: resolved fixed

Advice associated with pointcuts that match join points in inner classes are not shown. Declare warning/error are shown however. See attached screenshot for example below. Notice WEAVEINFO messages indicate problem is in AJDT not AspectJ. Also notice phantom entry in Outline view "injar aspectL Test.java". package bug_nnnnn; public class Test { public void test () { new Runnable() { public void run() { try { throw new Exception(); } catch (Exception ex) { handleException(ex); } } }; } public static void handleException (Throwable th) { } public static void main(String[] args) { try { throw new Exception(); } catch (Exception ex) { handleException(ex); } } } aspect Aspect { declare warning : call(void handleException(..)) && !within(Aspect) : "Only Aspect should handle exceptions"; pointcut caughtExceptions (Throwable th) : handler(Throwable+) && args(th); before (Throwable th) : caughtExceptions(th) { Test.handleException(th); } }

Files changed in fix:
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java