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

javac is too late detecting invalid annotation usage

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b113
    • Verification:
      Verified

      Description

      Test case:

      class Test<@DA T> { }

      @interface DA { }

      javac rejects it, with
      play/src/Test.java:1: error: annotation type not applicable to this kind of declaration
      class Test<@DA T> { }
                 ^
      1 error


      javadoc accepts it, and generates docs
      build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/javadoc -d play/api -private play/src/Test.java
      Loading source file play/src/Test.java...
      Constructing Javadoc information...
      Standard Doclet version 1.8.0-internal
      Building tree for all the packages and classes...
      Generating play/api/DA.html...
      Generating play/api/Test.html...
      Generating play/api/package-frame.html...
      Generating play/api/package-summary.html...
      Generating play/api/package-tree.html...
      Generating play/api/constant-values.html...
      Building index for all the packages and classes...
      Generating play/api/overview-tree.html...
      Generating play/api/index-all.html...
      Generating play/api/deprecated-list.html...
      Building index for all classes...
      Generating play/api/allclasses-frame.html...
      Generating play/api/allclasses-noframe.html...
      Generating play/api/index.html...
      Generating play/api/help-doc.html...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jlahoda Jan Lahoda
                Reporter:
                jjg Jonathan Gibbons
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: