JDK-6206490 : REGRESSION: Javadoc generates invalid HTML in "START OF CLASS DATA" section
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,linux,windows_xp
  • CPU: generic,x86
  • Submitted: 2004-12-09
  • Updated: 2014-05-05
  • Resolved: 2009-01-26
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Linux h126 2.6.5-gentoo-r1 #3 Wed May 26 13:14:46 CEST 2004 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
Konqueror 3.3
KDE 3.3.0

A DESCRIPTION OF THE PROBLEM :
The generated HTML for the "START OF CLASS DATA" section in the HTML generated for a class is causing Konqueror to render the page in an erroneous way.

This was not a problem with the Javadoc tool in JDK 1.4.2, so I looked at the differences between the generated files for 1.4.2 and 1.5.0. The problem is in this change:

 <HR>
 <DL>
-<DT>public final class <B>XINSCallResult</B><DT>extends <A HREF="../../../org/xins/common/service/CallResult.html" title="class in org.xins.common.service">CallResult</A></DL>
+<DT><PRE>public final class <B>XINSCallResult</B><DT>extends <A HREF="../../../org/xins/common/service/CallResult.html" title="class in org.xins.common.service">CallResult</A></DL>
+</PRE>

The problem here is that the tags are not closed in the correct order. Without the PCDATA text, the tags are:

<DT><PRE><B></B><DT><A></A></DL></PRE>

The PRE tagged should, however, be closed before the DL tag is closed.

If you want screenshots, let me know.

This happens for both 1.5.0-rc and for 1.5.0 (FCS).

REGRESSION.  Last worked in version 1.4.2_xx.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use javadoc for any set of classes.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Same as javadoc 1.4.2_05

ACTUAL -
  From Javadoc 1.5.0:
I have attached the output from 5.0 as an attachment.

REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.
###@###.### 2004-12-09 17:01:03 GMT
CR 6329212 mentions:
<DT> tags left unclosed.

Comments
EVALUATION This is a specific issue for a more generic bug that is filed. This bug will be addressed as a part of 6786690.
26-01-2009

EVALUATION Ideally the <dt> tags should be closed with </dt>.
07-06-2006

EVALUATION In formats.html.ClassWriterImpl.writeClassSignature: dl(); dt(); preNoNewLine(); ... dlEnd(); preEnd(); It looks like the call to preNoNewLine() should be moved up two lines. This fixes the main problem, but produces a spurious linebreak because dl() adds a newline. Create a dlNoNewLine() version of the method and call it instead.
07-06-2006

EVALUATION Should be fixed. ###@###.### 2005-07-18 19:34:55 GMT
18-07-2005