[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
Tue Jul 23 15:20:51 UTC 2019

On 23/07/2019 16:08, Brian Burkhalter wrote:
> I don’t see what you mean.
>      @Override
>      public void write(byte buf[]) throws IOException {
>          super.write(buf);
>      }
> Should “trouble” be set and the IOE re-thrown?
super.write(byte[]) will invoke PrintStream overrides write(byte[], int, 
int) so IOE won't be thrown (and why the proposed change to the class 
description isn't right). The method description is probably the best 
place to describe the behavior.


More information about the core-libs-dev mailing list