8187898: PrintStream should override FilterOutputStream#write(byte[]) with a method that has no throws clause

Brian Burkhalter brian.burkhalter at oracle.com
Tue Aug 13 21:28:58 UTC 2019


Reprising discussion of [1] from last month. I updated the patch [2] which now hopefully accounts for the various comments. Specifically the specification of the PrintStream.write(byte[]) override was clarified as follows:

A) If auto-flush is enabled data will be flushed.

B) API Note:
 * No IOException is actually thrown but the error flag is set instead;
 * Refer user to writeBytes(byte[]) and write(byte[],int,int).

C) Implementation Requirements:
* Equivalent to this.write(buf, 0, buf.length), not super.write(buf, 0, buf.length).

The implementation is updated as well per the foregoing statement.

Thanks,

Brian

[1] https://bugs.openjdk.java.net/browse/JDK-8187898 <https://bugs.openjdk.java.net/browse/JDK-8187898>
[2] http://cr.openjdk.java.net/~bpb/8187898/webrev-alt.04/


More information about the core-libs-dev mailing list