changeset 13623:a0f4440da08a

8144991: AIOOB Exception in AutoImageWriterTest with TIFF writer Summary: In TIFFImageWriter call reset() in setOuput() when output != null. Reviewed-by: prr
author bpb
date Mon, 04 Jan 2016 17:07:23 -0800
parents 7e9a5a26088c
children e63cf6b55a95
files src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriter.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriter.java	Mon Jan 04 17:05:04 2016 -0800
+++ b/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!");