You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2019/01/11 13:50:42 UTC

[cxf] 02/02: CXF-7940 - FileUtils.delete dramatically slowdown WildFly server shutdown

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 82080f21d3b2689cbc299be4ac899e75b336646f
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Jan 11 13:50:19 2019 +0000

    CXF-7940 - FileUtils.delete dramatically slowdown WildFly server shutdown
---
 core/src/main/java/org/apache/cxf/helpers/FileUtils.java | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/helpers/FileUtils.java b/core/src/main/java/org/apache/cxf/helpers/FileUtils.java
index 42b59c2..6d21442 100644
--- a/core/src/main/java/org/apache/cxf/helpers/FileUtils.java
+++ b/core/src/main/java/org/apache/cxf/helpers/FileUtils.java
@@ -29,7 +29,6 @@ import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -253,9 +252,6 @@ public final class FileUtils {
     }
     public static void delete(File f, boolean inShutdown) {
         if (!f.delete()) {
-            if (isWindows()) {
-                System.gc();
-            }
             try {
                 Thread.sleep(RETRY_SLEEP_MILLIS);
             } catch (InterruptedException ex) {
@@ -267,11 +263,6 @@ public final class FileUtils {
         }
     }
 
-    private static boolean isWindows() {
-        String osName = SystemPropertyAction.getProperty("os.name").toLowerCase(Locale.US);
-        return osName.indexOf("windows") > -1;
-    }
-
     public static File createTempFile(String prefix, String suffix) throws IOException {
         return createTempFile(prefix, suffix, null, false);
     }