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

AssertionError in Annotate.fromAnnotations with -Xdoclint

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 14, 15, 16, 17
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b03

      Description

      My colleague Chris Povirk discovered that the following program causes javac to crash when -Xdoclint is enabled:

      $ cat LinkAnno.java
      /** {@link #equals(@Deprecated Object)} */
      class LinkAnno {
      }

      $ javac -fullversion -Xdoclint LinkAnno.java
      javac full version "16-ea+34-2216"
      An exception has occurred in the compiler (16-ea). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
      java.lang.AssertionError
              at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155)
              at jdk.compiler/com.sun.tools.javac.util.Assert.checkNonNull(Assert.java:62)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.fromAnnotations(Annotate.java:167)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.lambda$annotateTypeSecondStage$5(Annotate.java:1046)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:194)
              at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5056)
              at jdk.compiler/com.sun.tools.javac.comp.Attr.attrib(Attr.java:5002)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1344)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
              at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317)
              at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
              at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
              at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jfranck Joel Borggrén-Franck
              Reporter:
              cushon Liam Miller-Cushon
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: