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

javadoc triggers javac AssertionError for annos on modules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 15
    • 13, 14
    • tools
    • b13
    • Verified

      The following exception occurred when playing with a very simple test case across different JDK versions. Although the error is "deep" in javac, it only occurs when javac is invoked via javadoc. The error does not appear for any recent version of JDK javac.

      The issue first shows up in JDK 13 (9 through 12 are OK) and so counts as a regression.

      Attached is the original test case. Here is the output from the test, showing the exceptions:
      $ sh play/extract/run.sh 2>&1 | tee play/extract/log
      Compiling with 9
      Documenting with 9
      Creating destination directory: "play/extract/api-9/"
      Compiling with 10
      Documenting with 10
      Creating destination directory: "play/extract/api-10/"
      javadoc: warning - You have not specified the version of HTML to use.
      The default is currently HTML 4.01, but this will change to HTML5
      in a future release. To suppress this warning, please specify the
      version of HTML used in your documentation comments and to be
      generated by this doclet, using the -html4 or -html5 options.
      1 warning
      Compiling with 11
      Documenting with 11
      Creating destination directory: "play/extract/api-11/"
      Compiling with 12
      Documenting with 12
      Creating destination directory: "play/extract/api-12/"
      Compiling with 13
      Documenting with 13
      javadoc: error - fatal error encountered: java.lang.AssertionError
      javadoc: error - Please file a bug against the javadoc tool via the Java bug reporting page
      (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com)
      for duplicates. Include error messages and the following diagnostic 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.check(Assert.java:46)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.lambda$annotateLater$0(Annotate.java:252)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:191)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.unblockAnnotations(Annotate.java:144)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:157)
      at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterDone(JavaCompiler.java:1746)
      at jdk.javadoc/jdk.javadoc.internal.tool.JavadocEnter.main(JavadocEnter.java:80)
      at jdk.javadoc/jdk.javadoc.internal.tool.JavadocTool.getEnvironment(JavadocTool.java:212)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:543)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:399)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:345)
      at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
      at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
      2 errors
      find: ‘play/extract/api-13’: No such file or directory
      Compiling with 14
      Documenting with 14
      javadoc: error - fatal error encountered: java.lang.AssertionError
      javadoc: error - Please file a bug against the javadoc tool via the Java bug reporting page
      (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com)
      for duplicates. Include error messages and the following diagnostic 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.check(Assert.java:46)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.lambda$annotateLater$0(Annotate.java:252)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:191)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.unblockAnnotations(Annotate.java:144)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:157)
      at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterDone(JavaCompiler.java:1752)
      at jdk.javadoc/jdk.javadoc.internal.tool.JavadocEnter.main(JavadocEnter.java:78)
      at jdk.javadoc/jdk.javadoc.internal.tool.JavadocTool.getEnvironment(JavadocTool.java:210)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:540)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:396)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:342)
      at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
      at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
      2 errors
      find: ‘play/extract/api-14’: No such file or directory
      Compiling with jdk.ref
      Documenting with jdk.ref
      javadoc: error - fatal error encountered: java.lang.AssertionError
      javadoc: error - Please file a bug against the javadoc tool via the Java bug reporting page
      (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com)
      for duplicates. Include error messages and the following diagnostic 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.check(Assert.java:46)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.lambda$annotateLater$0(Annotate.java:252)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:191)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.unblockAnnotations(Annotate.java:144)
      at jdk.compiler/com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:157)
      at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterDone(JavaCompiler.java:1752)
      at jdk.javadoc/jdk.javadoc.internal.tool.JavadocEnter.main(JavadocEnter.java:78)
      at jdk.javadoc/jdk.javadoc.internal.tool.JavadocTool.getEnvironment(JavadocTool.java:209)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:536)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:396)
      at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:342)
      at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
      at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
      2 errors
      find: ‘play/extract/api-jdk.ref’: No such file or directory

            jlahoda Jan Lahoda
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: