From 63c96bcd1d6be31678b9fb8a0caeb5dc5268a2a3 Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Mon, 9 Mar 2009 16:00:18 +0000 Subject: 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 --- java/common/src/main/java/org/apache/qpid/util/FileUtils.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'java/common/src/main') 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(); } -- cgit v1.2.1