changeset 35661:29a43191feaf

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 471caf9d2ac0
children 071d8bb58f41
files jdk/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/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!");