This is an automated email from the ASF dual-hosted git repository. billblough pushed a commit to branch 1_5 in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
commit bbdf4b7ed5cc5c7b2eb31b97382e904a41230f93 Author: Sagara Gunathunga <sag...@apache.org> AuthorDate: Wed May 23 09:10:07 2012 +0000 Merged r1332587 to the 1.5 branch. --- .../axis2/deployment/util/TempFileManager.java | 29 ++++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/modules/kernel/src/org/apache/axis2/deployment/util/TempFileManager.java b/modules/kernel/src/org/apache/axis2/deployment/util/TempFileManager.java index b26a272..3517a06 100644 --- a/modules/kernel/src/org/apache/axis2/deployment/util/TempFileManager.java +++ b/modules/kernel/src/org/apache/axis2/deployment/util/TempFileManager.java @@ -18,7 +18,12 @@ */ package org.apache.axis2.deployment.util; -import java.io.*; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileFilter; +import java.io.IOException; +import java.io.PrintStream; import java.util.logging.Level; import java.util.logging.Logger; @@ -135,16 +140,18 @@ public class TempFileManager { throws IOException { // Select all the files File[] files = rootDir.listFiles(); - for (File file : files) { - // If the file is a directory, we will - // recursively call delete on it. - if (file.isDirectory()) { - recursiveDelete(file); - } else { - // It is just a file so we are safe to - // delete it - if (!file.delete()) { - throw new IOException("Could not delete: " + file.getAbsolutePath()); + if (files != null) { + for (File file : files) { + // If the file is a directory, we will + // recursively call delete on it. + if (file.isDirectory()) { + recursiveDelete(file); + } else { + // It is just a file so we are safe to + // delete it + if (!file.delete()) { + throw new IOException("Could not delete: " + file.getAbsolutePath()); + } } } }