8144991: AIOOB Exception in AutoImageWriterTest with TIFF writer
authorbpb
Mon, 04 Jan 2016 17:07:23 -0800
changeset 35661 29a43191feaf
parent 35660 471caf9d2ac0
child 35662 071d8bb58f41
8144991: AIOOB Exception in AutoImageWriterTest with TIFF writer Summary: In TIFFImageWriter call reset() in setOuput() when output != null. Reviewed-by: prr
jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriter.java
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriter.java	Mon Jan 04 17:05:04 2016 -0800
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriter.java	Mon Jan 04 17:07:23 2016 -0800
@@ -266,6 +266,8 @@
         super.setOutput(output);
 
         if (output != null) {
+            reset();
+
             if (!(output instanceof ImageOutputStream)) {
                 throw new IllegalArgumentException
                     ("output not an ImageOutputStream!");