Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4952954

abort flag is not cleared for every write operation for JPEG ImageWriter

XMLWordPrintable

    • b52
    • generic
    • generic

        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.

              serb Sergey Bylokhov
              pmohansunw Praveen Mohan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: