You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/09/28 16:39:19 UTC

svn commit: r1002182 - /commons/proper/io/trunk/src/java/org/apache/commons/io/output/LockableFileWriter.java

Author: sebb
Date: Tue Sep 28 14:39:19 2010
New Revision: 1002182

URL: http://svn.apache.org/viewvc?rev=1002182&view=rev
Log:
IO-216 - Document that lock file deletion failure is not reported

Modified:
    commons/proper/io/trunk/src/java/org/apache/commons/io/output/LockableFileWriter.java

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/output/LockableFileWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/output/LockableFileWriter.java?rev=1002182&r1=1002181&r2=1002182&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/output/LockableFileWriter.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/output/LockableFileWriter.java Tue Sep 28 14:39:19 2010
@@ -34,6 +34,12 @@ import org.apache.commons.io.IOUtils;
  * This class provides a simple alternative to <code>FileWriter</code>
  * that will use a lock file to prevent duplicate writes.
  * <p>
+ * <b>N.B.</b> the lock file is deleted when {@link #close()} is called
+ * - or if the main file cannot be opened initially.
+ * In the (unlikely) event that the lockfile cannot be deleted, 
+ * this is not reported, and subsequent requests using
+ * the same lockfile will fail.
+ * <p>
  * By default, the file will be overwritten, but this may be changed to append.
  * The lock directory may be specified, but defaults to the system property
  * <code>java.io.tmpdir</code>.
@@ -260,7 +266,7 @@ public class LockableFileWriter extends 
 
     //-----------------------------------------------------------------------
     /**
-     * Closes the file writer.
+     * Closes the file writer and deletes the lockfile (if possible).
      *
      * @throws IOException if an I/O error occurs
      */