On 08/27/2013 12:12 AM, Alan Bateman wrote:
On 27/08/2013 01:18, Dan Xu wrote:
Hi All,

MaxPathLength.javais a troublesome testcase, and fails intermittently in the nightly test. And it also runs for a long time, especially on Windows platforms. Inorder to improve the test stability, I remove its unnecessary test iterations, and use NIOdelete method todo the clean-up to make the potential failureseasier for diagnosis. Please review thechanges. Thanks!

bug: https://bugs.openjdk.java.net/browse/JDK-8023765
webrev: http://cr.openjdk.java.net/~dxu/8023765/webrev/

-Dan
The double to quickly skip over the names to MAX_LENGTH/2 looks reasonable.

I guess fileCreated should really be fileExists as it may be deleted and then deleted. An alternative here would be to use Files.deleteIfExists as that would avoid the need to introduce flags to track whether the directory and exist exists.

-Alan
Hi Alan,

Those flag names are a little misleading. Sorry about that.

fileCreated and dirCreated are actually tracking the existence of new file and directories. If the new file gets deleted, I marked the flag to false in the code. And at the end, I also change the recorded file path after the rename operation.

I agree that using deleteIfExists is a good alternative. In my original thought, I plan to monitor every step and make sure all file operations happen as expected. Thanks!

-Dan

Reply via email to