Bug 248309 - [model] IAnnotatable#getAnnotations() does not work for standard annotations on binary members
Summary: [model] IAnnotatable#getAnnotations() does not work for standard annotations ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 236850
  Show dependency tree
 
Reported: 2008-09-23 13:15 EDT by Markus Keller CLA
Modified: 2008-10-27 15:41 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix and regression tests (69.50 KB, patch)
2008-10-23 07:15 EDT, Jerome Lanneluc CLA
no flags Details | Diff
Corresponding jclMin1.5.jar for tests (10.41 KB, application/x-java-archive)
2008-10-23 07:17 EDT, Jerome Lanneluc CLA
no flags Details
Corresponding jclMin1.5src.zip for tests (6.64 KB, image/zip)
2008-10-23 07:18 EDT, Jerome Lanneluc CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-09-23 13:15:51 EDT
I20080918-0100

IAnnotatable does not work for binary members. E.g. javax.annotation.Generated from JDK6 has no annotations in the Java model.
Comment 1 Jerome Lanneluc CLA 2008-09-25 09:56:42 EDT
The support for standard annotations is indeed missing. User defined annotations work correctly.

We should check if ClassFileReader.getTagBits() contains a standard annotation (see TagBits.Annotation* constants).
Comment 2 Jerome Lanneluc CLA 2008-10-23 07:15:52 EDT
Created attachment 115910 [details]
Proposed fix and regression tests
Comment 3 Jerome Lanneluc CLA 2008-10-23 07:17:34 EDT
Created attachment 115911 [details]
Corresponding jclMin1.5.jar for tests

To put in /org.eclipse.jdt.core.tests.model/JCL/jclMin1.5.jar
Comment 4 Jerome Lanneluc CLA 2008-10-23 07:18:23 EDT
Created attachment 115912 [details]
Corresponding jclMin1.5src.zip for tests

To put in /org.eclipse.jdt.core.tests.model/JCL/jclMin1.5src.zip
Comment 5 Jerome Lanneluc CLA 2008-10-23 10:02:15 EDT
Fix and tests released for 3.5M3
Comment 6 Olivier Thomann CLA 2008-10-27 15:41:19 EDT
Verified for 3.5M3 using I20081026-2000