-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
b56
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084049 | emb-9 | Sergey Bylokhov | P4 | Resolved | Fixed | team |
JDK-8086873 | 8u65 | Sergey Bylokhov | P4 | Resolved | Fixed | b01 |
JDK-8078681 | 8u60 | Sergey Bylokhov | P4 | Resolved | Fixed | b14 |
JDK-8138122 | emb-8u65 | Unassigned | P4 | Resolved | Fixed | b01 |
JDK-8079975 | emb-8u60 | Sergey Bylokhov | P4 | Resolved | Fixed | team |
The API Doc for ImageWriter.PrepareWriteSequence() claims that this method will throw UnsupportedOperationException when canWriteSequence() returns false. But this does not seem to be happening for JPEG ImageWriter. JPG writer has failed to override the method canWriteSequence() and relies on the parent class ImageWriter which returns a 'false' value by default. But JPEGImageWriter class has actually implemented the method prepareWriteSequence() and it does not throw UnsupportedOperationException when canWriteSequence() returns false. I feel JPEGImageWriter class must override the method canWriteSequence() and must return a 'true' value since it actually supports the prepareWriteSequence and endWriteSequence() methods. Otherwise it must throw the expected exception - UnsupportedOperationException. This works fine for all other writers.
This is reproducible on all platforms right from JDK1.4.
I have attached a sample testcase. Execute the testcase with 'JPG' commandline argument and watch the console for the status messages. If you see a 'FAIL' message the bug is reproduced.
This is reproducible on all platforms right from JDK1.4.
I have attached a sample testcase. Execute the testcase with 'JPG' commandline argument and watch the console for the status messages. If you see a 'FAIL' message the bug is reproduced.
- backported by
-
JDK-8078681 JPGWriter does not throw UnsupportedException when canWriteSequence retuns false
-
- Resolved
-
-
JDK-8079975 JPGWriter does not throw UnsupportedException when canWriteSequence retuns false
-
- Resolved
-
-
JDK-8084049 JPGWriter does not throw UnsupportedException when canWriteSequence retuns false
-
- Resolved
-
-
JDK-8086873 JPGWriter does not throw UnsupportedException when canWriteSequence retuns false
-
- Resolved
-
-
JDK-8138122 JPGWriter does not throw UnsupportedException when canWriteSequence retuns false
-
- Resolved
-