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

Phil Race philip.race at oracle.com
Thu Jul 7 20:26:35 UTC 2016

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 
been run .. assuming no other test crashes the VM before then.


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?
> Brian
> On Jul 7, 2016, at 4:38 AM, Jayathirth D V <jayathirth.d.v at oracle.com 
> <mailto:jayathirth.d.v at oracle.com>> wrote:
>> Please review the following fix in JDK9 :
>> Bug :https://bugs.openjdk.java.net/browse/JDK-7059970
>> Webrev :http://cr.openjdk.java.net/~jdv/7059970/webrev.00/ 
>> <http://cr.openjdk.java.net/%7Ejdv/7059970/webrev.00/>
>> Root cause : Test case ITXtTest.java is not deleting the file it is 
>> creating(test.png). Also it is not closing ImageInputStream that it 
>> is creating in between.
>> Fix : Close the stream and file that is used in the test case with 
>> tighter checks.

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

More information about the 2d-dev mailing list