-
Bug
-
Resolution: Fixed
-
P2
-
6
-
beta
-
generic
-
generic
-
Verified
I am creating an ImageOutputStream and setting it to the writer by calling writer.setOutput(ios). After this, I am calling writer.reset() and trying to write the buffered image. I expect the GIF writer to throw IllegalStateException (output not set) as per the specification. But GIF Writer throws a NullPointerException when calling reset().
This is reproducible on all platforms with the following PIT build:
java version "1.6.0-2d.pit-jcg-win-03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-2d.pit-jcg-win-03-java2d_23_may_2005_02_25-b00)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b37, mixed mode)
Here is the exception:
java.lang.NullPointerException
at com.sun.imageio.plugins.gif.GIFImageWriter.setOutput(GIFImageWriter.java:426)
at javax.imageio.ImageWriter.reset(ImageWriter.java:1994)
at com.sun.imageio.plugins.gif.GIFImageWriter.reset(GIFImageWriter.java:407)
at WriteAbortTest.<init>(WriteAbortTest.java:29)
at WriteAbortTest.main(WriteAbortTest.java:85)
I have attached a sample test. Execute the sample test and pass the image format as 'gif' and pass the attached image file. You would see the above exception on the console.
###@###.### 2005-05-24 15:03:55 GMT
This is reproducible on all platforms with the following PIT build:
java version "1.6.0-2d.pit-jcg-win-03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-2d.pit-jcg-win-03-java2d_23_may_2005_02_25-b00)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b37, mixed mode)
Here is the exception:
java.lang.NullPointerException
at com.sun.imageio.plugins.gif.GIFImageWriter.setOutput(GIFImageWriter.java:426)
at javax.imageio.ImageWriter.reset(ImageWriter.java:1994)
at com.sun.imageio.plugins.gif.GIFImageWriter.reset(GIFImageWriter.java:407)
at WriteAbortTest.<init>(WriteAbortTest.java:29)
at WriteAbortTest.main(WriteAbortTest.java:85)
I have attached a sample test. Execute the sample test and pass the image format as 'gif' and pass the attached image file. You would see the above exception on the console.
###@###.### 2005-05-24 15:03:55 GMT