RFR: 8276994: java/nio/channels/Channels/TransferTo.java leaves multi-GB files in /tmp [v2]
Alan Bateman
alanb at openjdk.java.net
Thu Nov 11 18:26:35 UTC 2021
On Thu, 11 Nov 2021 18:12:03 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
>
> Lance Andersen has updated the pull request incrementally with one additional commit since the last revision:
>
> Additional updates
test/jdk/java/nio/channels/Channels/TransferTo.java line 145:
> 143: try {
> 144: // preparing two temporary files which will be compared at the end of the test
> 145: sourceFile = Files.createTempFile("test2GBSource", null);
If this throws then Files.delete(sourceFile) will throw an NPE. I think it would be just a bit more robust to initialize sourceFile to Files.createTempFile(...) rather than null.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6360
More information about the nio-dev
mailing list