JDK-4952954 : abort flag is not cleared for every write operation for JPEG ImageWriter
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.imageio
  • Affected Version: 1.4.0,5.0,6u23,6u38,7,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-11-12
  • Updated: 2015-09-29
  • Resolved: 2015-02-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u60Fixed 9 b52Fixed
Description
The API doc for ImageWriter.abort() claims that every write operation must call clearAbortRequest at the begining. This is not supposed to be happening for JPG. When abort is invoked on a ImageWriter and the same writer is used to write the image again, the second write operation gets aborted immediately. This works fine for all other formats. Hence the abort flag must be reset at the begining of every write operation.

This is reproducible on all the platforms since JDK1.4.

I have attached a sample code. Execute the sample code and pass the image format as JPG. You would notice that the second write operation initiated after aborting the first one, also gets aborted immediately.

Comments
Please re-open if - if fix is in progress or on the plan to fix soon - if this is a P3 (file as P3, not P4)
14-03-2014