JDK-4136861 : Doclet API: static initializers need special handling
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.1.7,1.2.0,1.3.0
  • Priority: P5
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_2.5.1
  • CPU: generic,sparc
  • Submitted: 1998-05-11
  • Updated: 2002-06-27
  • Resolved: 2001-03-30
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 Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
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