Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4919

javadoc's Analyzer crashes on JDK 16

    XMLWordPrintableJSON

Details

    Description

      The Analyzer from the java/javadoc module may fail with exception like:

      Caused by: java.lang.NoClassDefFoundError: com/sun/tools/doclint/HtmlTag
      at org.netbeans.modules.javadoc.hints.Analyzer.visitStartElement(Analyzer.java:625)
      at org.netbeans.modules.javadoc.hints.Analyzer.visitStartElement(Analyzer.java:115)
      at jdk.compiler/com.sun.tools.javac.tree.DCTree$DCStartElement.accept(DCTree.java:850)
      at jdk.compiler/com.sun.source.util.DocTreePathScanner.scan(DocTreePathScanner.java:76)
      at org.netbeans.modules.javadoc.hints.Analyzer.scan(Analyzer.java:738)
      at org.netbeans.modules.javadoc.hints.Analyzer.scan(Analyzer.java:115)
      at jdk.compiler/com.sun.source.util.DocTreeScanner.scan(DocTreeScanner.java:102)
      at jdk.compiler/com.sun.source.util.DocTreeScanner.scanAndReduce(DocTreeScanner.java:110)
      at jdk.compiler/com.sun.source.util.DocTreeScanner.visitDocComment(DocTreeScanner.java:188)
      at org.netbeans.modules.javadoc.hints.Analyzer.visitDocComment(Analyzer.java:256)
      at org.netbeans.modules.javadoc.hints.Analyzer.visitDocComment(Analyzer.java:115)
      at jdk.compiler/com.sun.tools.javac.tree.DCTree$DCDocComment.accept(DCTree.java:138)
      at jdk.compiler/com.sun.source.util.DocTreePathScanner.scan(DocTreePathScanner.java:55)
      at org.netbeans.modules.javadoc.hints.Analyzer.analyze(Analyzer.java:169)
      at org.netbeans.modules.javadoc.hints.JavadocHint.errorHint(JavadocHint.java:192)
      at jdk.internal.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:317)

       

      While running on a development build of JDK 16. HtmlTag is an internal class in JDK, and was moved to a different location recently. Would be better to avoid dependency on JDK classes if we can.

      Attachments

        Issue Links

          Activity

            People

              jlahoda Jan Lahoda
              jlahoda Jan Lahoda
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m