Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8013485

javac can't handle annotations with a <clinit> from a previous compilation unit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 6-pool, 7, 8, 8-repo-lambda
    • Fix Version/s: 8
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b91
    • Verification:
      Verified

      Backports

        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

          Activity

          Hide
          mcimadamore Maurizio Cimadamore added a comment -
          Marked as tck-red as this is making the following (and similar) JCK test to fail:

          tests/lang/INTF/intf018/intf01802m11/intf01802m11.java
          Show
          mcimadamore Maurizio Cimadamore added a comment - Marked as tck-red as this is making the following (and similar) JCK test to fail: tests/lang/INTF/intf018/intf01802m11/intf01802m11.java
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/780014a234fa
          User: jfranck
          Date: 2013-05-08 12:12:28 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/780014a234fa User: jfranck Date: 2013-05-08 12:12:28 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk8/jdk8/langtools/rev/780014a234fa
          User: lana
          Date: 2013-05-21 17:59:33 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/jdk8/langtools/rev/780014a234fa User: lana Date: 2013-05-21 17:59:33 +0000
          Hide
          ssides Steve Sides added a comment -
          verified in jdk8 b92
          Show
          ssides Steve Sides added a comment - verified in jdk8 b92

            People

            • Assignee:
              jfranck Joel Borggrén-Franck
              Reporter:
              mcimadamore Maurizio Cimadamore
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: