You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2006/10/06 23:59:05 UTC

svn commit: r453786 - /incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentManagerImpl.java

Author: mriou
Date: Fri Oct  6 14:59:04 2006
New Revision: 453786

URL: http://svn.apache.org/viewvc?view=rev&rev=453786
Log:
Reusing FileUtils

Modified:
    incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentManagerImpl.java

Modified: incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentManagerImpl.java?view=diff&rev=453786&r1=453785&r2=453786
==============================================================================
--- incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentManagerImpl.java (original)
+++ incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentManagerImpl.java Fri Oct  6 14:59:04 2006
@@ -31,6 +31,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ode.utils.fs.FileUtils;
 
 /**
  * A simple implementation of the
@@ -84,7 +85,7 @@
                 return;
             _deploymentsList.remove(du.getDeployDir().getName());
             write();
-            rm(du.getDeployDir());
+            FileUtils.deepDelete(du.getDeployDir());
         } finally {
             _rwLock.writeLock().unlock();
         }
@@ -97,21 +98,6 @@
             return new ArrayList<DeploymentUnitImpl>(_knownDeployments);
         } finally {
             _rwLock.writeLock().unlock();
-        }
-    }
-
-    /**
-     * Remove a file or directory, possibly recursively.
-     * 
-     * @param f
-     */
-    private void rm(File f) {
-        if (f.isDirectory()) {
-            for (File child : f.listFiles())
-                rm(child);
-            f.delete();
-        } else {
-            f.delete();
         }
     }