Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322741 - Field visibility on class level annotation inconsistent with Sun JDK 1.6.0_20-b02
Summary: Field visibility on class level annotation inconsistent with Sun JDK 1.6.0_20...
Status: VERIFIED DUPLICATE of bug 316456
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.6.1   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-16 00:26 EDT by Christopher G. Stach II CLA
Modified: 2010-09-14 10:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher G. Stach II CLA 2010-08-16 00:26:46 EDT
Build Identifier: I20100608-0911

A class with a structure like this compiles fine under Eclipse:

@SomeAnnotation(value = {
    ExampleClass.FOO
})
public class ExampleClass {
    private static final String FOO = "foo";
}

When compiled with Sun's javac, an error similar to this is the result:

    [javac] ExampleClass.java:89: FOO has private access in ExampleClass
    [javac]     ExampleClass.FOO,

Of course, changing the field from private to protected visibility works for both.

Reproducible: Always
Comment 1 Srikanth Sankaran CLA 2010-08-16 01:03:58 EDT
The problem does not show up on HEAD.
This is a duplicate of bug 316456 as
can be confirmed by backing out the fix
for that bug and being able to reproduce
the problem.

*** This bug has been marked as a duplicate of bug 316456 ***
Comment 2 Frederic Fusier CLA 2010-08-26 10:58:26 EDT
Verified for 3.6.1 using build M20100825-0800.

I haven't reset the Whiteboard intentionally as I think it would be safe to
also verify this test case in HEAD stream (it's different than the test case of bug 316456 comment 0...)
Comment 3 Olivier Thomann CLA 2010-09-14 10:46:22 EDT
Verified for 3.7M2 using I20100914-0100