JDK-4753853 : "The first sentence" warning split between stderr and stdout
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-09-26
  • Updated: 2003-08-01
  • Resolved: 2003-08-01
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
5.0 tigerFixed
Description

Name: rmT116609			Date: 09/26/2002


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

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]

A DESCRIPTION OF THE PROBLEM :
The warning that begins "The first sentence is interpreted
to be" reports the header to stderr, but the rest of the
warning is sent to stdout.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Java program with a Javadoc comment before the
main method such as:

  /** This tests the "first sentence" msg. reported by
javadoc. This is a second sentence. */

2. Run javadoc on it (without the -breakiterator option),
redirecting stdout and stderr to two different files:

  javadoc MyTest.java > out.txt 2> err.txt

(Note that there's no way to redirect stderr SFAIK under
Win9x, so I think this requires Win2x to test.)

3. View out.txt and err.txt.


EXPECTED VERSUS ACTUAL BEHAVIOR :
Stderr will show a warning such as:

c:\java\MyTest.java:8: warning - The first sentence is
interpreted to be:

Stdout will contain the rest of the warning:

This tests the "first sentence" msg.
This sentence is different from what will be interpreted as
the first sentence in the
next major release (when that interpretation will be
internationalized), which is:
[etc.]

The whole report should probably go to stderr only.
Otherwise, I'm having to play "Match the Data to the Error
Header".

Arguably, this might not be worth fixing, based on the
description of first sentence detection in the Javadoc
documentation.  That is, the "first sentence" warning may
go away in 1.4.2 or later.  However, this bug may be
occurring for other warnings, so I thought it best to
report it anyway.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
c:\java\MyTest.java:8: warning - The first sentence is interpreted to be:

Source:

/*

public class MyTest {

  /** This tests the "first sentence" msg. reported by
javadoc. This is a second sentence. */


public static void main(String a[]) {

System.out.println("hello");

}
}

*/

REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 165008) 
======================================================================

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

PUBLIC COMMENTS ...
10-06-2004

EVALUATION Yes, it should all go out to one place. ###@###.### 2002-10-17 This may have been fixed already. I'm not sure. If not, I beleive the right fix is to use a single resource key for the diagnostic. ###@###.### 2003-04-17
17-10-2002