Due to the latest improvements, an error which was previously not thrown unexpectedly according to a source code comment in test aspect ParameterizedTypesInAnnotationPatterns.aj is now thrown for this kind of pointcut: staticinitialization(@(Foo || List<String>) String) Now the compiler correctly says: no static initialization join points for parameterized types, use raw type instead Relates to #221. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>tags/V1_9_22_1
public aspect ParameterizedTypesInAnnotationPatterns { | public aspect ParameterizedTypesInAnnotationPatterns { | ||||
// CE - not an annotation type | // CE - not an annotation type | ||||
pointcut simple() : staticinitialization(@List<String> String); | pointcut simple() : staticinitialization(@List<String> String); | ||||
// no CE, good enough for now? may improve error reporting for this later | |||||
// CE - no static initialization join points for parameterized types, use raw type instead | |||||
pointcut combined() : staticinitialization(@(Foo || List<String>) String); | pointcut combined() : staticinitialization(@(Foo || List<String>) String); | ||||
} | } | ||||
@interface Foo {} | |||||
@interface Foo {} |
<ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types"> | <ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types"> | ||||
<compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.5"> | <compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.5"> | ||||
<message kind="error" line="5" text="is not an annotation type"/> | <message kind="error" line="5" text="is not an annotation type"/> | ||||
<message kind="error" line="8" text="no static initialization join points for parameterized types, use raw type instead"/> | |||||
</compile> | </compile> | ||||
</ajc-test> | </ajc-test> | ||||
<ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types"> | <ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types"> | ||||
<compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.9"> | <compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.9"> | ||||
<message kind="error" line="5" text="is not an annotation type"/> | <message kind="error" line="5" text="is not an annotation type"/> | ||||
<message kind="error" line="8" text="no static initialization join points for parameterized types, use raw type instead"/> | |||||
</compile> | </compile> | ||||
</ajc-test> | </ajc-test> | ||||