JDK-4821796 : use of {@value} in custom tag generates a NullPointerException
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2003-02-21
  • Updated: 2014-05-05
  • Resolved: 2003-11-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b28Fixed
Description

Name: rmT116609			Date: 02/20/2003


FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)


FULL OPERATING SYSTEM VERSION :

Linux westmalle 2.4.18-k7 #1 Sun Apr 14 13:19:11 EST 2002
i686 unknown unknown GNU/Linux

ADDITIONAL OPERATING SYSTEMS : debian

A DESCRIPTION OF THE PROBLEM :
the following breaks javadoc:

public interface bla{
  /**
   * bla
   * @key {@value}
   */
  public final static String bla = "bla";
}

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
generate the javadoc for it using:
 javadoc -d ./apiDocs -tag 'key:f:Key:' bla.java


EXPECTED VERSUS ACTUAL BEHAVIOR :
well i expect it either to work, or to tell me @value is not allowed in custom tags, but instead it does an NPE

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Generating ./apiDocs/bla.html...
javadoc: In doclet class com.sun.tools.doclets.standard.Standard,  method start
has thrown an exception java.lang.reflect.InvocationTargetException
java.lang.NullPointerException
        at
com.sun.tools.doclets.standard.tags.ValueTaglet.toString(ValueTaglet.java:43)
        at
com.sun.tools.doclets.standard.HtmlStandardWriter.commentTagsToString(HtmlStandardWriter.java:1650)
        at
com.sun.tools.doclets.standard.tags.SimpleTaglet.toString(SimpleTaglet.java:244)
        at
com.sun.tools.doclets.standard.AbstractSubWriter.printTags(AbstractSubWriter.java:235)
        at
com.sun.tools.doclets.standard.AbstractSubWriter.printCommentAndTags(AbstractSubWriter.java:293)
        at
com.sun.tools.doclets.standard.AbstractSubWriter.printFullComment(AbstractSubWriter.java:287)
        at
com.sun.tools.doclets.standard.FieldSubWriter.printMember(FieldSubWriter.java:100)
        at
com.sun.tools.doclets.standard.AbstractSubWriter.printMembers(AbstractSubWriter.java:424)
        at
com.sun.tools.doclets.standard.ClassWriter.printAllMembers(ClassWriter.java:277)
        at
com.sun.tools.doclets.standard.ClassWriter.generateClassFile(ClassWriter.java:243)
        at com.sun.tools.doclets.standard.ClassWriter.generate(ClassWriter.java:95)
        at
com.sun.tools.doclets.standard.Standard.generateClassCycle(Standard.java:245)
        at
com.sun.tools.doclets.standard.Standard.generateClassFiles(Standard.java:195)
        at
com.sun.tools.doclets.standard.Standard.startGeneration(Standard.java:166)
        at com.sun.tools.doclets.standard.Standard.start(Standard.java:44)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:193)
        at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:92)
        at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:301)
        at com.sun.tools.javadoc.Start.begin(Start.java:120)
        at com.sun.tools.javadoc.Main.execute(Main.java:41)
        at com.sun.tools.javadoc.Main.main(Main.java:31)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------

public interface bla{
  /**
   * bla
   * @key {@value}
   */
  public final static String bla = "bla";
}
---------- END SOURCE ----------
(Review ID: 179647) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger tiger-beta FIXED IN: tiger tiger-beta INTEGRATED IN: tiger-b28 tiger-beta
14-06-2004

PUBLIC COMMENTS Fixed. ###@###.### 2003-10-11
11-10-2003

EVALUATION This bug is very closely related to the bug: 4654636: Taglet does not allow use of inline tags ###@###.### 2003-02-20 Bug is not reproducible. Checking in a regression test to prove this. ###@###.### 2003-10-11
20-02-2003