[OpenJDK 2D-Dev] Review Request for JDK-7059970 : Test case: javax/imageio/plugins/png/ITXtTest.java is not closing a file

Brian Burkhalter brian.burkhalter at oracle.com
Thu Jul 7 20:47:09 UTC 2016


Good point - probably better to make it explicit then. The try-with-resources should still be cleaner for closing the streams however.

Brian

On Jul 7, 2016, at 1:26 PM, Phil Race <philip.race at oracle.com> wrote:

> I suppose deleteOnExit might be OK but jtreg re-uses the VM
> so it will not get deleted until much later - after all N thousand tests have
> been run .. assuming no other test crashes the VM before then.
> 
> -phil.
> 
> On 07/07/2016 10:41 AM, Brian Burkhalter wrote:
>> Why not simply invoke deleteOnExit() on the file instance immediately after it is created and use try-with-resources blocks for the Image{Input,Output}Stream instances?

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


More information about the 2d-dev mailing list