RFR: 8276994: java/nio/channels/Channels/TransferTo.java leaves multi-GB files in /tmp

Alan Bateman alanb at openjdk.java.net
Thu Nov 11 17:15:39 UTC 2021


On Thu, 11 Nov 2021 17:01:48 GMT, Lance Andersen <lancea at openjdk.org> wrote:

> Hi,
> 
> This patch addresses the issue where the very large temp files are not cleaned up after the testMoreThanTwoGB completes.
> 
> 
> Best
> Lance

Thanks for taking this one. I guess it should really be Files.delete as both files do exist, leaving it as deleteIfExists is okay. It's possible that creating targetFile will fail and leave sourceFile behind but it will be an empty file so won't fill up the file system. So I think this is okay as is.

-------------

Marked as reviewed by alanb (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6360


More information about the nio-dev mailing list