| Summary: | Spurious warning in pointcut [Xlint:unmatchedSuperTypeInCall] | ||
|---|---|---|---|
| Product: | [Tools] AspectJ | Reporter: | Andrew Eisenberg <andrew.eisenberg> |
| Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.6.9 | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
In the following code, I get a warning in the pointcut definition with the following text: "does not match because declaring type is p.Shape, if match desired use target(p.Triangle) [Xlint:unmatchedSuperTypeInCall]", But the advice does match in the call in the main method. It seems like this warning should not be there. package p; class Shape { public void m() { } } class Triangle extends Shape { public void m() { } } aspect Aspect { pointcut callMethTriangle() : call (public void Triangle.m()); before(Triangle t) : callMethTriangle() && target(t){ System.out.println("Triangle avdice"); } public static void main(String[] args) { Shape s = new Triangle(); ((Triangle) s).m(); } }