JDK 9 RFR of 8160221: jdk/test/java/nio/channels/FileChannel/Transfers.java leaving files behind

Brian Burkhalter brian.burkhalter at oracle.com
Mon Jul 11 21:29:39 UTC 2016


For some as yet unknown reason a regression test run strangely had an error for this change on Windows only. Need to run that down before pushing this.

Brian

On Jul 11, 2016, at 12:56 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> Looks okay to me.
> 
> On 09/07/2016 01:22, Brian Burkhalter wrote:
>> Please review at your convenience.
>> 
>> Issue:	https://bugs.openjdk.java.net/browse/JDK-8160221
>> Diff:
>> 
>> --- a/test/java/nio/channels/FileChannel/Transfers.java
>> +++ b/test/java/nio/channels/FileChannel/Transfers.java
>> @@ -489,12 +489,14 @@
>>                  debug = verbose = true;
>>          }
>>  
>> -        sourceFile = File.createTempFile("xfer.src.", "");
>> +        File testDir = new File(System.getProperty("test.dir", "."));
>> +
>> +        sourceFile = File.createTempFile("xfer.src.", "", testDir);
>>          sourceFile.deleteOnExit();
>> -        targetFile = File.createTempFile("xfer.tgt.", "");
>> +        targetFile = File.createTempFile("xfer.tgt.", "", testDir);
>>          targetFile.deleteOnExit();
>>  
>> -        File fn = File.createTempFile("xfer.fch.", "");
>> +        File fn = File.createTempFile("xfer.fch.", "", testDir);
>>          fn.deleteOnExit();
>>          FileChannel fc = new RandomAccessFile(fn, "rw").getChannel();
>> 
>> 
>> Summary: Create temporary files in the test scratch directory instead of in the default temporary file directory.
>> 
>> Thanks,
>> 
>> Brian
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20160711/a34e9ef9/attachment-0001.html>


More information about the nio-dev mailing list