Bug 125810 - Missing error when inherited abstract pointcut not made concrete in sub-@aspect
Summary: Missing error when inherited abstract pointcut not made concrete in sub-@aspect
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.1   Edit
Assignee: Helen Beeken CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-31 06:26 EST by Matthew Webster CLA
Modified: 2012-04-03 16:00 EDT (History)
0 users

See Also:


Attachments
Testcase (5.39 KB, application/octet-stream)
2006-01-31 06:33 EST, Matthew Webster CLA
no flags Details
proposed fix (1.34 KB, patch)
2006-02-01 08:16 EST, Helen Beeken CLA
aclement: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Webster CLA 2006-01-31 06:26:45 EST
An error is issued when a sub-aspect does not implement an inherited abstract pointcut. This is missing for a sub-@aspect.
Comment 1 Matthew Webster CLA 2006-01-31 06:33:14 EST
Created attachment 33852 [details]
Testcase

Includes bug 125699
Comment 2 Andrew Clement CLA 2006-02-01 04:29:35 EST
Straightforward (hopefully) one for you Helen.
Comment 3 Helen Beeken CLA 2006-02-01 06:14:24 EST
The reason the error message isn't coming out is in AjLookupEnvironment.resolvePointcutDeclarations(..). The pointcut declarations are only checked if the aspect has pointcuts or it's an AspectDeclaration. In the case of the supplied testcase, there are no pointcuts in the SubAtAspect and its not an AspectDeclaration (it's a TypeDeclaration instead). If you add another pointcut to the SubAtAspect then the testcase passes and the expected error message appears. 

The fix is therefore to augment the check to see if we're an @Aspect TypeDeclaration and if so then check the pointcut declarations.
Comment 4 Helen Beeken CLA 2006-02-01 08:16:03 EST
Created attachment 33933 [details]
proposed fix

Patch containing a proposed fix - apply this to the org.aspectj.ajdt.core project.
Comment 5 Andrew Clement CLA 2006-02-02 03:07:36 EST
fix available.