Bug 301683 - Annotations are broken when native methods are present in a class
Summary: Annotations are broken when native methods are present in a class
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-03 06:18 EST by Michael Schneider CLA
Modified: 2010-03-08 07:41 EST (History)
3 users (show)

See Also:


Attachments
Patch under test (3.59 KB, patch)
2010-02-03 07:31 EST, Srikanth Sankaran CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Schneider CLA 2010-02-03 06:18:18 EST
Build Identifier: I20100129-1300

See the example below:

the @Inline won't compile as long as the native method is present: "The attribute value is undefined for the annotation type Test.Inline"

public class Test {
	
	public @interface Inline {
		String value();
	}

	@Inline("foo")
	public String test;

	public native void method();

}

Reproducible: Always
Comment 1 Michael Schneider CLA 2010-02-03 06:19:54 EST
this worked fine in I20091030-1201
Comment 2 Srikanth Sankaran CLA 2010-02-03 06:55:02 EST
Mea culpa. This seems to be side effect of the fix for bug# 243917.
Will investigate.
Comment 3 Srikanth Sankaran CLA 2010-02-03 07:31:36 EST
Created attachment 158048 [details]
Patch under test

The fix to bug#243917 was causing field resolutions
to occur too prematurely. The current patch restores
the older behavior.
Comment 4 Michael Schneider CLA 2010-02-03 09:04:48 EST
patch works for me, thanks!
Comment 5 Srikanth Sankaran CLA 2010-02-04 00:13:02 EST
Thanks for checking, Michael.

Ayush, a quick review would be appreciated -- Thanks.
Comment 6 Ayushman Jain CLA 2010-02-05 03:50:26 EST
Patch looks good.
Comment 7 Srikanth Sankaran CLA 2010-02-05 04:01:24 EST
Thanks Ayush. Released in HEAD for 3.6M6
Comment 8 Ayushman Jain CLA 2010-03-08 07:33:57 EST
Verified for 3.6M6 using build I20100305-1011.
Comment 9 Jay Arthanareeswaran CLA 2010-03-08 07:41:52 EST
Verified.