Bug 290133 - Provide better error when subclass is missing @Aspect
Summary: Provide better error when subclass is missing @Aspect
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-22 10:24 EDT by Jakub Holy CLA
Modified: 2013-06-24 11:04 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Holy CLA 2009-09-22 10:24:19 EDT
Using @AspectJ notion, if I have an abstract aspect and define a subclass but forget to add the @Aspect annotation (which could be inheritable anyway) I get a confusing error "class MyChildAspect can not extend aspect MyParentAspect". It'd be much better if the error read "The class MyChildAspect extending the aspect MyParentAspect should be declared as aspect itself using either the annotation @Aspect or keyword 'aspect' instead of 'class'."

@ Aspect
public abstract class MyParentAspect {
...
}
-----
public class MyChildAspect extends MyParentAspect {
...
}

Using Eclipse 3.4, AJDT 2.0.0.e34x
Comment 1 Andrew Clement CLA 2013-06-24 11:04:19 EDT
unsetting the target field which is currently set for something already released