summaryrefslogtreecommitdiff
path: root/java/common/src/main
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-03-09 16:00:18 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-03-09 16:00:18 +0000
commit63c96bcd1d6be31678b9fb8a0caeb5dc5268a2a3 (patch)
tree5ee476692342b8861ca870dcfac21c3c1f361683 /java/common/src/main
parent1214783620f81f2b0b1e69c4c4df874d58cdf85b (diff)
downloadqpid-python-63c96bcd1d6be31678b9fb8a0caeb5dc5268a2a3.tar.gz
Removed false positive return from FU.delete(). Delete mirrors functionality provided by java.io. Attempting to delete an non-existent file returns false. The caller must handle this correctly. If client provides a null value then the call will throw a NPE which is a valid java response.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@751720 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src/main')
-rw-r--r--java/common/src/main/java/org/apache/qpid/util/FileUtils.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/util/FileUtils.java b/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
index 029e298c32..e4bfb9c664 100644
--- a/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
+++ b/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
@@ -246,12 +246,6 @@ public class FileUtils
{
boolean success = true;
- // If we have nothing to delete then it must be ok to say it was deleted.
- if (file == null || !file.exists())
- {
- return true;
- }
-
if (file.isDirectory())
{
if (recursive)
@@ -267,7 +261,7 @@ public class FileUtils
return false;
}
- return success && file.delete();
+ return file.delete();
}