JDK-4625400 : stddoclet: Missing whitespace in DOCTYPE declaration
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2002-01-17
  • Updated: 2014-05-05
  • Resolved: 2002-10-25
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
1.4.2 mantisFixed
Description

Name: jl125535			Date: 01/17/2002


FULL PRODUCT VERSION :
java version "1.3.1"
Jav(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.1-FCS)
Java HotSpot(TM) Client VM (build Blackdown-1.3.1-FCS, mixed mode)

FULL OPERATING SYSTEM VERSION :
linux-2.4.17
libc6-2.2.4
Debian GNU 3.0

This behavior also appears on Solaris 8 with JDK 1.4 beta 3.


A DESCRIPTION OF THE PROBLEM :
This bug is very similar to 4418115.

The generated JavaDoc documentation has a wrong DOCTYPE
definition:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0
Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">

There is no blank between the public identifier
"-//W3C/DTD HTML 4.0 Transitional//EN"
and its URI
"http://www.w3.org/TR/REC-html40/loose.dtd"

Every old generated JavaDoc is wrong. The bug was found when
trying to parse generated JavaDoc for automated index
generation of installed package documentation.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. echo "public class x { }" > x.java
2. javadoc x.java
3. head -1 *.html

EXPECTED VERSUS ACTUAL BEHAVIOR :
Actual Result:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0
Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">

Expected Result:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
class x { }
---------- END SOURCE ----------

CUSTOMER WORKAROUND :
Postprecess every generated JavaDoc and add a blank:
find . -name \*.html -exec perl -i -p -e 's,<!DOCTYPE HTML
PUBLIC "-//W3C/DTD HTML 4.0
Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">,<!DOCTYPE
HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">,' {} \;
(Review ID: 138175) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b05
14-06-2004

PUBLIC COMMENTS Fixed by adding the required space. Regresssion test at: <ws>/test/com/sun/javadoc/ValidHtml/ValidHtml.java ###@###.### 2002-09-25
25-09-2002

EVALUATION It does appear from spot checking that there is indeed not a character space. However, I'm not sure if the specification for the DOCTYPE declaration requires a space. Must be investigated. ###@###.### 2002-01-17
17-01-2002