Name: rmT116609 Date: 05/24/2004
FULL PRODUCT VERSION :
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Win XP, but irrelevant
A DESCRIPTION OF THE PROBLEM :
Javadoc for java.io.PrintWriter says: " Methods in this class never throw I/O exceptions. The client may inquire as to whether any errors have occurred by invoking checkError()."
That is not correct. Many public methods in PrintWriter throw exceptions,
including both forms of printf and both forms of append().
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Read the javadoc and the source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
expect javadoc to be consistent with source
ACTUAL -
they are not consistent
REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 274810)
======================================================================
- relates to
-
JDK-5030623 (fmt) {Print{Writer,Stream},StringWriter}.append should not throw IOException
-
- Resolved
-