JDK-6876782 : two javadoc tests fail on Windows
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-08-28
  • Updated: 2011-07-15
  • Resolved: 2011-07-15
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.
JDK 7
7 b72Fixed
Related Reports
Relates :  
Description
Two tests fail when run on Windows.

com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitrionListTag.java
com/sun/javadoc/testSerializedFormDeprecationInfo/testSerializedFormDeprecationInfo.java
These fail because newlines ("\n") are not being output correctly for the platform.
It looks like the problem is with newlines in the input text not being converted when
the input text is written to the output.

Comments
EVALUATION The problem is caused by HtmlDocletWriter lines 1554 to 1559. The text is broken into lines but the line delimiters are being left "as-is" rather than being converted to platform newlines. By itself, this is not bad, since HTML will tolerate either Unix or Windows newlines, but the problem is with the javadoc test framework JavadocTester which rigidly requires platform newlines. Option 1: change javadoc to always convert to platform newlines Option 2: change JavadocTester to be more tolerant of Unix/Windows newline variances
28-08-2009