[OpenJDK 2D-Dev] [9] RFR JDK-8164931 : Verify if writer.abort() works properly for all writers in IIOWriteProgressListener.

Jayathirth D V jayathirth.d.v at oracle.com
Fri Sep 16 09:04:51 UTC 2016



Please review the following fix in JDK9 at your convenience:


This issue is similar to https://bugs.openjdk.java.net/browse/JDK-4924727 where we made changes to all ImageReader plugins.


Bug : https://bugs.openjdk.java.net/browse/JDK-8164931 


Webrev : http://cr.openjdk.java.net/~jdv/8164931/webrev.00/ 


Issue : Verify that when we issue ImageWriter.abort() in IIOWriteProgressListener callbacks whether writing is aborted properly.


Root cause : In many writer plugins we are not checking for abortRequested() right after IIOWriteProgressListener callbacks. In which case writing may continue until we check for abortRequested(). Also in some writers we are not calling clearAbortRequest() before every write() call.


Solution : Check for abortRequested() after every IIOWriteProgressListener callbacks and before every write() call we should have clearAbortRequest() called.


In case of JPEG clearAbortRequest() is overridden in JPEGImageWriter and it clears native abort flag also so there is no change in JPEGImageWriter. WBMP changes will be done in JDK-8164930 as checkSampleModel() is failing for WBMP.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160916/6c2c964e/attachment.html>

More information about the 2d-dev mailing list