commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Lucas (JIRA)" <>
Subject [jira] [Comment Edited] (IMAGING-128) TIFF Image Writer is not flushing output
Date Wed, 26 Feb 2014 19:51:20 GMT


Gary Lucas edited comment on IMAGING-128 at 2/26/14 7:50 PM:

I had added a patch to address this, but removed it because it conflicted with the more one
I added for IMAGING-126.  I will submit a new patch after 126 gets in.  

However, if I was too slow and the 128 patch has already been applied, the 126 patch can be
added to it without a problem,,,  The changes for 126 happen in an earlier part of

was (Author: gwlucas):
The attached patch addresses the tracker issue.  It was tested successfully using the round-trip
test included in the mvn "package" target.

> TIFF Image Writer is not flushing output
> ----------------------------------------
>                 Key: IMAGING-128
>                 URL:
>             Project: Commons Imaging
>          Issue Type: Bug
>            Reporter: Gary Lucas
>            Priority: Minor
> The writeImage() method in the TiffImageWriterBase class takes an
argument as the destination for its output.  It does not explicitly call flush() on the output
stream when it is finished writing data.  If the calling application allows the output stream
to go out of scope, rather than explicitly calling close(), any pending output will be lost
and the output image file will be left in a broken state.  Although, ideally, applications
SHOULD explicitly call close() on an i/o file, we should probably add a call to flush to the
writeImage method to provide some robustness.
> This behavior was observed in Java 7.

This message was sent by Atlassian JIRA

View raw message