From 15ac6d2b8e83a73ac1f62ab0da0d6a85717f28fd Mon Sep 17 00:00:00 2001 From: Abhishek Koneru Date: Mon, 9 Jul 2012 15:12:11 -0400 Subject: NO_HASHCODE_OVERRIDDEN --- base/java-tools/src/com/netscape/cmstools/PasswordCache.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'base/java-tools') diff --git a/base/java-tools/src/com/netscape/cmstools/PasswordCache.java b/base/java-tools/src/com/netscape/cmstools/PasswordCache.java index 89254a2a5..d97a21706 100644 --- a/base/java-tools/src/com/netscape/cmstools/PasswordCache.java +++ b/base/java-tools/src/com/netscape/cmstools/PasswordCache.java @@ -609,7 +609,9 @@ class PWsdrCache { if (tmpPWcache.exists()) { // it wasn't removed? - tmpPWcache.delete(); + if (!tmpPWcache.delete()) { + debug("Could not delete the existing " + mPWcachedb + ".tmp file."); + } } outstream = new FileOutputStream(mPWcachedb + ".tmp"); @@ -626,7 +628,9 @@ class PWsdrCache { try { // Always remove any pre-existing target file if (origFile.exists()) { - origFile.delete(); + if (!origFile.delete()) { + debug("Could not delete the existing " + mPWcachedb + "file."); + } } if (isNT()) { @@ -644,7 +648,9 @@ class PWsdrCache { // Remove the temporary file if and only if // the "rename" was successful. if (origFile.exists()) { - tmpPWcache.delete(); + if (!tmpPWcache.delete()) { + debug("Could not delete the existing " + mPWcachedb + ".tmp file."); + } // Make certain that the final file has // the correct permissions. -- cgit