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

Javadoc prints NPE when using Taglet

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8
    • tools
    • None
    • java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b91)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b33, mixed mode)

      Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux

    • b91
    • 8
    • b108
    • Verified

    Description

      After upgrading from JDK 8-b90 to JDK 8-b91, building javadocs for Apache Derby resulted in lots of NullPointerExceptions being printed to the console.

      The problem can be reproduced by using the ToDoTaglet that's provided as an example at http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/taglet/overview.html

      To reproduce:

      1) Download and compile ToDoTaglet.java per instructions in the docs link above.

      2) Create a Java class, Test.java:

      /**
       * @todo Fix this!
       */
      public class Test {
      }

      3) Generate javadoc for Test.java:

          javadoc -taglet ToDoTaglet -tagletpath /path/to/taglet Test.java

      Before b91, this command would happily build the javadoc. On b91 and later, however, it prints NullPointerExceptions to the console while doing so:

      Loading source file Test.java...
      Constructing Javadoc information...
      Registered Taglet ToDoTaglet ...
      Standard Doclet version 1.8.0-ea
      Building tree for all the packages and classes...
      Generating ./Test.html...
      java.lang.NullPointerException
      at com.sun.tools.doclets.internal.toolkit.Content.nullCheck(Content.java:115)
      at com.sun.tools.doclets.formats.html.markup.RawHtml.<init>(RawHtml.java:56)
      at com.sun.tools.doclets.internal.toolkit.taglets.LegacyTaglet.getTagletOutput(LegacyTaglet.java:133)
      at com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter.genTagOuput(TagletWriter.java:220)
      at com.sun.tools.doclets.formats.html.HtmlDocletWriter.addTagsInfo(HtmlDocletWriter.java:250)
      at com.sun.tools.doclets.formats.html.ConstructorWriterImpl.addTags(ConstructorWriterImpl.java:173)
      at com.sun.tools.doclets.internal.toolkit.builders.ConstructorBuilder.buildTagInfo(ConstructorBuilder.java:229)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:180)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractMemberBuilder.build(AbstractMemberBuilder.java:78)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:161)
      at com.sun.tools.doclets.internal.toolkit.builders.ConstructorBuilder.buildConstructorDoc(ConstructorBuilder.java:175)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:180)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractMemberBuilder.build(AbstractMemberBuilder.java:78)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:161)
      at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.buildConstructorDetails(ClassBuilder.java:403)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:180)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:161)
      at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.buildMemberDetails(ClassBuilder.java:355)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:180)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:161)
      at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.buildClassDoc(ClassBuilder.java:148)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:180)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(ClassBuilder.java:120)
      at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:195)
      at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:195)
      at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:179)
      at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:127)
      at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:82)
      at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:80)
      at com.sun.tools.doclets.standard.Standard.start(Standard.java:39)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
      at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
      at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:360)
      at com.sun.tools.javadoc.Start.begin(Start.java:215)
      at com.sun.tools.javadoc.Start.begin(Start.java:201)
      at com.sun.tools.javadoc.Main.execute(Main.java:64)
      at com.sun.tools.javadoc.Main.main(Main.java:54)
      Generating ./package-frame.html...
      Generating ./package-summary.html...
      java.lang.NullPointerException
      at com.sun.tools.doclets.internal.toolkit.Content.nullCheck(Content.java:115)
      at com.sun.tools.doclets.formats.html.markup.RawHtml.<init>(RawHtml.java:56)
      at com.sun.tools.doclets.internal.toolkit.taglets.LegacyTaglet.getTagletOutput(LegacyTaglet.java:133)
      at com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter.genTagOuput(TagletWriter.java:220)
      at com.sun.tools.doclets.formats.html.HtmlDocletWriter.addTagsInfo(HtmlDocletWriter.java:250)
      at com.sun.tools.doclets.formats.html.PackageWriterImpl.addPackageTags(PackageWriterImpl.java:228)
      at com.sun.tools.doclets.internal.toolkit.builders.PackageSummaryBuilder.buildPackageTags(PackageSummaryBuilder.java:362)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:180)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:161)
      at com.sun.tools.doclets.internal.toolkit.builders.PackageSummaryBuilder.buildContent(PackageSummaryBuilder.java:140)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:180)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:161)
      at com.sun.tools.doclets.internal.toolkit.builders.PackageSummaryBuilder.buildPackageDoc(PackageSummaryBuilder.java:124)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.invokeMethod(AbstractBuilder.java:180)
      at com.sun.tools.doclets.internal.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:135)
      at com.sun.tools.doclets.internal.toolkit.builders.PackageSummaryBuilder.build(PackageSummaryBuilder.java:106)
      at com.sun.tools.doclets.formats.html.HtmlDoclet.generatePackageFiles(HtmlDoclet.java:264)
      at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:131)
      at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:82)
      at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:80)
      at com.sun.tools.doclets.standard.Standard.start(Standard.java:39)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
      at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
      at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:360)
      at com.sun.tools.javadoc.Start.begin(Start.java:215)
      at com.sun.tools.javadoc.Start.begin(Start.java:201)
      at com.sun.tools.javadoc.Main.execute(Main.java:64)
      at com.sun.tools.javadoc.Main.main(Main.java:54)
      Generating ./package-tree.html...
      Generating ./constant-values.html...
      Building index for all the packages and classes...
      Generating ./overview-tree.html...
      Generating ./index-all.html...
      Generating ./deprecated-list.html...
      Building index for all classes...
      Generating ./allclasses-frame.html...
      Generating ./allclasses-noframe.html...
      Generating ./index.html...
      Generating ./help-doc.html...
      Note: Custom tags that could override future standard tags: @todo. To avoid potential overrides, use at least one period character (.) in custom tag names.

      Attachments

        Activity

          People

            bpatel Bhavesh Patel (Inactive)
            khatlen Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: