Summary: | negated annotation type pattern fails | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Wes Isberg <wes> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | aclement |
Version: | 1.5.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Wes Isberg
2006-08-10 12:31:03 EDT
interesting program. The reason this pointcut execution(@Annot * *(..)) && within(!@Annot *) matches against the first type is because of the use of an inner type. class AnnotTest { @Annot class Derived extends Base { @Annot void func() { } } } the method-execution of func() does kind of occur 'within' a non-annotated type, the AnnotTest type. If we annotate AnnotTest like this: @Annot class AnnotTest { @Annot class Derived extends Base { @Annot void func() { } } } then the pointcut no longer matches. So we have to think about the difference between: "!within(@Annot *)" and "within(!Annot *)". The first says "match join points that are not within an @Annot annotated type", the second says "match joinpoints that are within a non-@Annot annotated type". testcase is committed but commented out |