8227438: [TESTLIB] Determine if file exists by Files.exists in function FileUtils.deleteFileIfExistsWithRetry
authorfyuan
Mon, 15 Jul 2019 17:53:36 +0800
changeset 55677 4b1de39beda3
parent 55676 901ab17af3ce
child 55678 296560a21cea
8227438: [TESTLIB] Determine if file exists by Files.exists in function FileUtils.deleteFileIfExistsWithRetry Reviewed-by: lancea, joehw
test/lib/jdk/test/lib/util/FileUtils.java
--- a/test/lib/jdk/test/lib/util/FileUtils.java	Sat Jul 13 20:55:25 2019 +0900
+++ b/test/lib/jdk/test/lib/util/FileUtils.java	Mon Jul 15 17:53:36 2019 +0800
@@ -96,7 +96,7 @@
      */
     public static void deleteFileIfExistsWithRetry(Path path) throws IOException {
         try {
-            if (Files.exists(path)) {
+            if (!Files.notExists(path)) {
                 deleteFileWithRetry0(path);
             }
         } catch (InterruptedException x) {