8148454: [PIT] Failure of ReplaceMetadataTest on TIFF with IllegalStateException
Summary: Move super.setOutput() to end of setOutput() to avoid setting super.output to null
Reviewed-by: prr
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriter.java Sat Jul 23 02:08:17 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFImageWriter.java Fri Jul 22 14:32:49 2016 -0700
@@ -263,15 +263,15 @@
}
public void setOutput(Object output) {
- super.setOutput(output);
-
if (output != null) {
- reset();
-
if (!(output instanceof ImageOutputStream)) {
throw new IllegalArgumentException
("output not an ImageOutputStream!");
}
+
+ // reset() must precede setOutput() as it sets output to null
+ reset();
+
this.stream = (ImageOutputStream)output;
//
@@ -312,6 +312,8 @@
} else {
this.stream = null;
}
+
+ super.setOutput(output);
}
public IIOMetadata
--- a/jdk/test/ProblemList.txt Sat Jul 23 02:08:17 2016 +0530
+++ b/jdk/test/ProblemList.txt Fri Jul 22 14:32:49 2016 -0700
@@ -293,9 +293,6 @@
############################################################################
# jdk_imageio
-javax/imageio/plugins/shared/CanWriteSequence.java 8148454 generic-all
-javax/imageio/plugins/tiff/MultiPageTest/MultiPageTest.java 8148454 generic-all
-javax/imageio/plugins/tiff/WriteToSequenceAfterAbort.java 8148454 generic-all
############################################################################
--- a/jdk/test/javax/imageio/plugins/tiff/MultiPageImageTIFFFieldTest.java Sat Jul 23 02:08:17 2016 +0530
+++ b/jdk/test/javax/imageio/plugins/tiff/MultiPageImageTIFFFieldTest.java Fri Jul 22 14:32:49 2016 -0700
@@ -23,7 +23,6 @@
/**
* @test
- * @ignore 8148454
* @bug 8152183 8148454
* @author a.stepanov
* @summary check that TIFFields are derived properly for multi-page tiff