8227438: [TESTLIB] Determine if file exists by Files.exists in function FileUtils.deleteFileIfExistsWithRetry

Reviewed-by: lancea, joehw
This commit is contained in:
Frank Yuan 2019-07-15 17:53:36 +08:00
parent 81a59941af
commit 2169215b29

View File

@ -96,7 +96,7 @@ public final class FileUtils {
*/
public static void deleteFileIfExistsWithRetry(Path path) throws IOException {
try {
if (Files.exists(path)) {
if (!Files.notExists(path)) {
deleteFileWithRetry0(path);
}
} catch (InterruptedException x) {