8144991: AIOOB Exception in AutoImageWriterTest with TIFF writer

In TIFFImageWriter call reset() in setOuput() when output != null.

Reviewed-by: prr
This commit is contained in:
Brian Burkhalter 2016-01-04 17:07:23 -08:00
parent ceb6329fdc
commit 4fd3a00aaa

View File

@ -266,6 +266,8 @@ public class TIFFImageWriter extends ImageWriter {
super.setOutput(output);
if (output != null) {
reset();
if (!(output instanceof ImageOutputStream)) {
throw new IllegalArgumentException
("output not an ImageOutputStream!");