directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r951569 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
Date Fri, 04 Jun 2010 21:05:48 GMT
Author: felixk
Date: Fri Jun  4 21:05:48 2010
New Revision: 951569

URL: http://svn.apache.org/viewvc?rev=951569&view=rev
Log:
Respect return value of method

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java?rev=951569&r1=951568&r2=951569&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
Fri Jun  4 21:05:48 2010
@@ -171,7 +171,10 @@ public class MemoryChangeLogStore implem
         
         if ( revFile.exists() )
         {
-            revFile.delete();
+            if( !revFile.delete() )
+            {
+                throw new IOException( I18n.err( I18n.ERR_726_FILE_UNDELETABLE, revFile.getAbsolutePath()
) );
+            }
         }
 
         PrintWriter out = null;
@@ -204,7 +207,10 @@ public class MemoryChangeLogStore implem
         
         if ( tagFile.exists() )
         {
-            tagFile.delete();
+            if( !tagFile.delete() )
+            {
+                throw new IOException( I18n.err( I18n.ERR_726_FILE_UNDELETABLE, tagFile.getAbsolutePath()
) );
+            }
         }
 
         FileOutputStream out = null;
@@ -379,7 +385,10 @@ public class MemoryChangeLogStore implem
         
         if ( file.exists() )
         {
-            file.delete();
+            if( !file.delete() )
+            {
+                throw new IOException( I18n.err( I18n.ERR_726_FILE_UNDELETABLE, file.getAbsolutePath()
) );
+            }
         }
 
         try



Mime
View raw message