[OpenJDK 2D-Dev] 8187898: PrintStream should override FilterOutputStream#write(byte[]) with a method that has no throws clause
Alan Bateman
Alan.Bateman at oracle.com
Wed Jul 24 06:58:52 UTC 2019
On 23/07/2019 17:41, Brian Burkhalter wrote:
> :
>
> Here is an update which accounts for the foregoing comments.
>
> http://cr.openjdk.java.net/~bpb/8187898/webrev-alt.02/
>
I looked at this version, and webrev-alt.03, but I think
PS.write(byte[]) will need further word smiting to properly explain the
confusion on using PrintStream vs. sub-classes of PrintStream that
override this method (the former does not throw IOE, the latter may). So
I think the @apiNote will be expanded further and the recommendation to
use writeBytes(byte[]) or write(byte[],0,len) instead should be dialed
up. The @implSpec also needs to be expanded as it doesn't make it clear
that the default implementation (by way of invoking
super.write(byte[],int,int)) does not throw IOE. I'm also wondering if
PS.write(byte[]) should be deprecated. Hard to know how much time to
spend on this issue as it has existed since JDK 1.0.
-Alan
More information about the core-libs-dev
mailing list