United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4136861 : Doclet API: static initializers need special handling

Details
Type:
Bug
Submit Date:
1998-05-11
Status:
Closed
Updated Date:
2002-06-27
Project Name:
JDK
Resolved Date:
2001-03-30
Component:
tools
OS:
solaris_2.5.1,generic
Sub-Component:
javadoc(tool)
CPU:
sparc,generic
Priority:
P5
Resolution:
Fixed
Affected Versions:
1.1.7,1.2.0,1.3.0
Fixed Versions:
1.4.0 (beta)

Related Reports
Duplicate:
Duplicate:
Relates:

Sub Tasks

Description
Tested in JDK1.2Beta4-E.	

static {...} in source code tmp.java will cause "Methods inherited .." table starts with "," in tmp.html(tmp.java in attached):

 slappy 158 =>javadoc -package tmp.java
Loading source file tmp.java...
Constructing Javadoc information...
Building tree for all the packages and classes...
Building index for all the packages and classes...
Generating tree.html...
Generating index-all.html...
Generating deprecatedlist.html...
Building index for all classes...
Generating allclasses-frame.html...
Generating index.html...
Generating tmp.html...
Generating serializedform.html...
Generating help.html...
Generating stylesheet.css...
 slappy 159 =>

dianne.jiao@East 1998-05-11
Another problem with javadoc's handling of static {...} in source code: it is indexed under character "<" in file index-all.html.

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
merlin-beta

FIXED IN:
merlin-beta

INTEGRATED IN:
merlin-beta

VERIFIED IN:
merlin-beta3


                                     
2004-06-14
PUBLIC COMMENTS

.
                                     
2004-06-10
EVALUATION

This is quite a visible bug.  Changed from priority 5 to 4.
doug.kramer@Eng 1998-05-18

This bug occurs only with -package option, so it's a lower-priority 4 bug.
doug.kramer@Eng 1998-07-09

The correct way to handle initializers would be for them to have unique
initializer access, e.g. in ClassDoc:  
	InitializerDoc[] initializers();

This will need to wait for the next major release.  In the mean time,
the effect on output is minor and only occurs when using the "-package"
flag -- a rare thing.
robert.field@Eng 1998-09-16

It turns out this bug was introduced in the standard doclet while trying to
work around another bug in the javadoc tool. The underlying bug is that
javadoc considers

	static {}

to be a method. It isn't a method and shouldn't result in a method entry
in the javadoc API.

neal.gafter@Eng 2001-02-26
                                     
2001-02-26



Hardware and Software, Engineered to Work Together