United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8013485 : javac can't handle annotations with a <clinit> from a previous compilation unit

Details
Type:
Bug
Submit Date:
2013-04-29
Status:
Closed
Updated Date:
2015-02-02
Project Name:
JDK
Resolved Date:
2013-05-08
Component:
tools
OS:
Sub-Component:
javac
CPU:
Priority:
P2
Resolution:
Fixed
Affected Versions:
6-pool,7,8,8-repo-lambda
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
The following code does not compile:

@interface A {
    Runnable r1 = ()->{}; //1
    Runnable r2 = new Runnable() { public void run() { }}; //2
}

@A
class Test { }

Following output is generated:

Test.java:93: error: annotation A is missing values for attributes lambda$0,<clinit>
@A
^
1 error

However, this is only partly lambda-related - if line (1) is commented, the following output is generated:

Test.java:94: error: annotation A is missing value for the attribute <clinit>
@A
^
1 error


                                    

Comments
verified in jdk8 b92
                                     
2013-06-06
Marked as tck-red as this is making the following (and similar) JCK test to fail:

tests/lang/INTF/intf018/intf01802m11/intf01802m11.java
                                     
2013-04-29



Hardware and Software, Engineered to Work Together