added checks before warning that a file could not be deleted

Former-commit-id: 098ea1889b49ade0c73385919906398c86627ab2
This commit is contained in:
Jeremy Long
2014-05-07 19:31:21 -04:00
parent 65aa7bd1de
commit b8bf01acc3

View File

@@ -178,7 +178,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
if (tempFileLocation != null && tempFileLocation.exists()) {
LOGGER.log(Level.FINE, "Attempting to delete temporary files");
final boolean success = FileUtils.delete(tempFileLocation);
if (!success) {
if (!success && tempFileLocation != null & tempFileLocation.exists()) {
LOGGER.log(Level.WARNING, "Failed to delete some temporary files, see the log for more details");
}
}