Bug 154332 - [annotations] Incorrect handling of java.lang annotations when matching
Summary: [annotations] Incorrect handling of java.lang annotations when matching
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.3   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-18 03:49 EDT by Andrew Clement CLA
Modified: 2006-08-18 04:18 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 2006-08-18 03:49:03 EDT
As raised by Mr Bodkin on the list:
Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior.

 

@Deprecated @Marker

public aspect Annot {

 

    pointcut test() : within(@Marker *);// *);

   

    declare warning: staticinitialization(@Deprecated *): "deprecated";   

    declare warning: staticinitialization(@Marker *): "marker";   

   

    public static void main(String argz[]) {

        new Baz().foo();

    }

}

 

@Deprecated @Marker

class Baz {

    public void foo() {}

}

 

@Retention(RetentionPolicy.RUNTIME)

public @interface Marker {

 

}
Comment 1 Andrew Clement CLA 2006-08-18 04:18:18 EDT
test and fix committed - some silly code that chopped java.lang off the front and left us with something that wouldn't resolve (doh!) - who writes this rubbish...