United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4821796 : use of {@value} in custom tag generates a NullPointerException

Details
Type:
Bug
Submit Date:
2003-02-21
Status:
Resolved
Updated Date:
2003-11-11
Project Name:
JDK
Resolved Date:
2003-11-11
Component:
docs
OS:
linux
Sub-Component:
doclet
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
5.0 (b28)

Related Reports

Sub Tasks

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


                                     
2004-06-14
PUBLIC COMMENTS

Fixed.
###@###.### 2003-10-11
                                     
2003-10-11
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
                                     
2003-02-20



Hardware and Software, Engineered to Work Together