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

javadoc: com.sun.tools.javac.code.Type$AnnotatedType casting error

    Details

    • Subcomponent:
    • Introduced In Build:
      b91
    • Introduced In Version:
      8
    • CPU:
      x86_64
    • OS:
      generic

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
      Maven home: /usr/local/Cellar/maven/3.6.0/libexec
      Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre
      Default locale: en_GB, platform encoding: UTF-8
      OS name: "mac os x", version: "10.14.2", arch: "x86_64", family: "mac"

      A DESCRIPTION OF THE PROBLEM :
      Trying to build the JavaDoc for the org.apache.sling.api bundle fails with the following error:
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:javadoc (default-cli) on project org.apache.sling.api: An error has occurred in JavaDocs report generation:
      [ERROR] Exit code: 1 - java.lang.ClassCastException: com.sun.tools.javac.code.Type$AnnotatedType cannot be cast to com.sun.tools.javac.code.Type$ClassType
      [ERROR] at com.sun.tools.javac.api.JavacTrees$3.visitErrorType(JavacTrees.java:689)
      [ERROR] at com.sun.tools.javac.api.JavacTrees$3.visitErrorType(JavacTrees.java:646)
      [ERROR] at com.sun.tools.javac.code.Type$ErrorType.accept(Type.java:1829)
      [ERROR] at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4571)
      [ERROR] at com.sun.tools.javac.api.JavacTrees.fuzzyMatch(JavacTrees.java:642)
      [ERROR] at com.sun.tools.javac.api.JavacTrees.fuzzyMatch(JavacTrees.java:633)
      [ERROR] at com.sun.tools.javac.api.JavacTrees.hasParameterTypes(JavacTrees.java:625)
      [ERROR] at com.sun.tools.javac.api.JavacTrees.searchMethod(JavacTrees.java:572)
      [ERROR] at com.sun.tools.javac.api.JavacTrees.findMethod(JavacTrees.java:528)
      [ERROR] at com.sun.tools.javac.api.JavacTrees.attributeDocReference(JavacTrees.java:414)
      [ERROR] at com.sun.tools.javac.api.JavacTrees.getElement(JavacTrees.java:345)
      [ERROR] at com.sun.tools.doclint.Checker.visitReference(Checker.java:773)
      [ERROR] at com.sun.tools.doclint.Checker.visitReference(Checker.java:95)
      [ERROR] at com.sun.tools.javac.tree.DCTree$DCReference.accept(DCTree.java:523)
      [ERROR] at com.sun.source.util.DocTreePathScanner.scan(DocTreePathScanner.java:65)
      [ERROR] at com.sun.source.util.DocTreeScanner.visitLink(DocTreeScanner.java:177)
      [ERROR] at com.sun.tools.doclint.Checker.visitLink(Checker.java:701)
      [ERROR] at com.sun.tools.doclint.Checker.visitLink(Checker.java:95)
      [ERROR] at com.sun.tools.javac.tree.DCTree$DCLink.accept(DCTree.java:422)
      [ERROR] at com.sun.source.util.DocTreePathScanner.scan(DocTreePathScanner.java:65)
      [ERROR] at com.sun.source.util.DocTreeScanner.scanAndReduce(DocTreeScanner.java:81)
      [ERROR] at com.sun.source.util.DocTreeScanner.scan(DocTreeScanner.java:92)
      [ERROR] at com.sun.source.util.DocTreeScanner.visitDocComment(DocTreeScanner.java:139)
      [ERROR] at com.sun.tools.doclint.Checker.visitDocComment(Checker.java:217)
      [ERROR] at com.sun.tools.doclint.Checker.visitDocComment(Checker.java:95)
      [ERROR] at com.sun.tools.javac.tree.DCTree$DCDocComment.accept(DCTree.java:122)
      [ERROR] at com.sun.source.util.DocTreePathScanner.scan(DocTreePathScanner.java:47)
      [ERROR] at com.sun.tools.doclint.Checker.scan(Checker.java:179)
      [ERROR] at com.sun.tools.doclint.DocLint.scan(DocLint.java:319)
      [ERROR] at com.sun.tools.javadoc.DocImpl.comment(DocImpl.java:143)
      [ERROR] at com.sun.tools.javadoc.DocImpl.tags(DocImpl.java:164)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap$ClassMembers.checkOnPropertiesTags(VisibleMemberMap.java:686)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap$ClassMembers.getClassMembers(VisibleMemberMap.java:464)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap$ClassMembers.addMembers(VisibleMemberMap.java:372)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap$ClassMembers.mapClass(VisibleMemberMap.java:346)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap$ClassMembers.build(VisibleMemberMap.java:341)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap$ClassMembers.access$100(VisibleMemberMap.java:291)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap.<init>(VisibleMemberMap.java:127)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.builders.MemberSummaryBuilder.<init>(MemberSummaryBuilder.java:82)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.builders.MemberSummaryBuilder.getInstance(MemberSummaryBuilder.java:101)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.builders.BuilderFactory.getMemberSummaryBuilder(BuilderFactory.java:278)
      [ERROR] at com.sun.tools.doclets.formats.html.ClassWriterImpl.getNavSummaryLinks(ClassWriterImpl.java:641)
      [ERROR] at com.sun.tools.doclets.formats.html.ClassWriterImpl.addSummaryDetailLinks(ClassWriterImpl.java:622)
      [ERROR] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.addNavLinks(HtmlDocletWriter.java:560)
      [ERROR] at com.sun.tools.doclets.formats.html.ClassWriterImpl.getHeader(ClassWriterImpl.java:165)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.buildClassDoc(ClassBuilder.java:145)
      [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:187)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(ClassBuilder.java:120)
      [ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:189)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:194)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:139)
      [ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:82)
      [ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:80)
      [ERROR] at com.sun.tools.doclets.standard.Standard.start(Standard.java:39)
      [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
      [ERROR] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
      [ERROR] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
      [ERROR] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366)
      [ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:219)
      [ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:205)
      [ERROR] at com.sun.tools.javadoc.Main.execute(Main.java:64)
      [ERROR] at com.sun.tools.javadoc.Main.main(Main.java:54)
      [ERROR] javadoc: error - com.sun.tools.javac.code.Type$AnnotatedType cannot be cast to com.sun.tools.javac.code.Type$ClassType
      [ERROR]
      [ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/../bin/javadoc @options @packages

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Clone the repository from https://github.com/apache/sling-org-apache-sling-api:
      git clone https://github.com/apache/sling-org-apache-sling-api.git

      2. Check out the org.apache.sling.api-2.20.0 tag
      git checkout org.apache.sling.api-2.20.0

      3. Run mvn javadoc:javadoc

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      JavaDoc generation works correctly.
      ACTUAL -
      See the stack trace from the description.

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              fmatte Fairoz Matte
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: