Here is an alternative version which adds a writeBytes(byte[]) method instead of overriding write(byte[]):
http://cr.openjdk.java.net/~bpb/8187898/webrev-alt.00/ <http://cr.openjdk.java.net/~bpb/8187898/webrev-alt.00/> This has the advantage of allowing new code to call writeBytes() without a try-catch block without introducing a compatibility issue for code which is already calling write(byte[]) in a try-catch block. Thanks, Brian > On Jul 15, 2019, at 9:00 AM, Brian Burkhalter <brian.burkhal...@oracle.com> > wrote: > >> On Jul 13, 2019, at 12:00 PM, Tagir Valeev <amae...@gmail.com >> <mailto:amae...@gmail.com>> wrote: >> >> And whilst great you are fixing up this code, we are but a small fraction of >> the world's code >> that use java.io <http://java.io/> and I wonder if this is worth the >> compatibility risk ? >> >> Why not introducing a separate writeBytes method like it was done for >> ByteArrayOutputStream (JDK-8199713)? > > Actually that seems like a better idea: accomplishes the objective while not > introducing a compatibility issue. Note: JDK 8199713 reference above is the > CSR of the actual issue [1]. > > Thanks, > > [1] https://bugs.openjdk.java.net/browse/JDK-8180410 > <https://bugs.openjdk.java.net/browse/JDK-8180410>