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

Pavel Rappo prappo at openjdk.java.net
Thu Nov 11 17:19:37 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

test/jdk/java/nio/channels/Channels/TransferTo.java line 165:

> 163:             System.out.printf("Cleaning up: %s, %s%n", sourceFile, targetFile);
> 164:             Files.deleteIfExists(sourceFile);
> 165:             Files.deleteIfExists(targetFile);

What about an exception thrown from `Files.deleteIfExists(sourceFile)` in that `finally` block?

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

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


More information about the nio-dev mailing list