Bug 268710 - unhelpful/unnecessary error for a generic aspect
Summary: unhelpful/unnecessary error for a generic aspect
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 1.6.4   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-16 00:51 EDT by Andrew Clement CLA
Modified: 2009-03-16 14:40 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2009-03-16 00:51:09 EDT
After fixing the NPE for bug 268689, we compile this code:

package none;

public aspect ConcreteAspect extends GenericAspect<String> {

}


package none;

public abstract aspect GenericAspect<T> {

        interface SomeInterface {
        }

        pointcut SomeConstructor(SomeInterface var) : execution(* SomeInterface(..)) && this(var);
}

"parameterized types not supported for this and target pointcuts (erasure limitation)"

It is considered parameterized when resolved through the concrete sub-aspect which defines T as String.
Comment 1 Andrew Clement CLA 2009-03-16 14:40:17 EDT
fixed this.

And noticed whilst creating a real runnable test case that the syntax of the pointcut is actually wrong for catching constructor calls, it should be:

execution(SomeInterface+.new(..))

and not

execution(* SomeInterface(..))

The problem that needed fixing is that member types of a generic type are considered parameterized (inheriting the parameterization of their containing type) but this shouldn't be for interfaces.