LockableFileWriter.close() should fail when the lock file cannot be
deleted.
MODIFY
src/changes/changes.xml
src/changes/changes.xml
@@ -105,6 +105,9 @@ The <action> type attribute can be add,update,fix,remove.
<action issue="IO-705" dev="ggregory" type="fix" due-to="Hao Zhong, Gary Gregory">
MarkShieldInputStream#reset should throw UnsupportedOperationException.
</action>
+ <action issue="IO-705" dev="ggregory" type="fix" due-to="Hao Zhong, Gary Gregory">
+ LockableFileWriter.close() should fail when the lock file cannot be deleted.
+ </action>
<!-- ADD -->
<action dev="ggregory" type="add" due-to="Gary Gregory">
Add FileSystemProviders class.

MODIFY
src/main/java/org/apache/commons/io/output/LockableFileWriter.java
src/main/java/org/apache/commons/io/output/LockableFileWriter.java
@@ -279,7 +279,7 @@ private Writer initWriter(final File file, final Charset charset, final boolean
}
/**
- * Closes the file writer and deletes the lock file (if possible).
+ * Closes the file writer and deletes the lock file.
*
* @throws IOException if an I/O error occurs
*/
@@ -288,7 +288,7 @@ public void close() throws IOException {
try {
out.close();
} finally {
- lockFile.delete();
+ FileUtils.delete(lockFile);
}
}

LockableFileWriter.close() should fail when the lock file cannot be
deleted.