This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit 4c5fb3befaf6639daccd9c77f8bb68744ed2da08 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Fri Jan 8 12:18:23 2021 -0500 Javadoc. Use the same param names as the JDK to avoid confusion. --- .../commons/io/output/LockableFileWriter.java | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/main/java/org/apache/commons/io/output/LockableFileWriter.java b/src/main/java/org/apache/commons/io/output/LockableFileWriter.java index 16c87a7..db85e42 100644 --- a/src/main/java/org/apache/commons/io/output/LockableFileWriter.java +++ b/src/main/java/org/apache/commons/io/output/LockableFileWriter.java @@ -32,18 +32,20 @@ import org.apache.commons.io.FileUtils; * <p> * This class provides a simple alternative to <code>FileWriter</code> * that will use a lock file to prevent duplicate writes. + * </p> * <p> - * <b>N.B.</b> the lock file is deleted when {@link #close()} is called + * <b>Note:</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, + * In the (unlikely) event that the lock file cannot be deleted, * this is not reported, and subsequent requests using - * the same lockfile will fail. + * the same lock file will fail. + * </p> * <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>. * The encoding may also be specified, and defaults to the platform default. - * + * </p> */ public class LockableFileWriter extends Writer { // Cannot extend ProxyWriter, as requires writer to be @@ -54,6 +56,7 @@ public class LockableFileWriter extends Writer { /** The writer to decorate. */ private final Writer out; + /** The lock file. */ private final File lockFile; @@ -217,7 +220,6 @@ public class LockableFileWriter extends Writer { this(file, Charsets.toCharset(charsetName), append, lockDir); } - //----------------------------------------------------------------------- /** * Tests that we can write to the lock directory. * @@ -252,7 +254,7 @@ public class LockableFileWriter extends Writer { } /** - * Initialize the wrapped file writer. + * Initializes the wrapped file writer. * Ensure that a cleanup occurs if the writer creation fails. * * @param file the file to be accessed @@ -276,9 +278,8 @@ public class LockableFileWriter extends Writer { } } - //----------------------------------------------------------------------- /** - * Closes the file writer and deletes the lockfile (if possible). + * Closes the file writer and deletes the lock file (if possible). * * @throws IOException if an I/O error occurs */ @@ -291,41 +292,40 @@ public class LockableFileWriter extends Writer { } } - //----------------------------------------------------------------------- /** - * Write a character. - * @param idx the character to write + * Writes a character. + * @param c the character to write * @throws IOException if an I/O error occurs */ @Override - public void write(final int idx) throws IOException { - out.write(idx); + public void write(final int c) throws IOException { + out.write(c); } /** - * Write the characters from an array. - * @param chr the characters to write + * Writes the characters from an array. + * @param cbuf the characters to write * @throws IOException if an I/O error occurs */ @Override - public void write(final char[] chr) throws IOException { - out.write(chr); + public void write(final char[] cbuf) throws IOException { + out.write(cbuf); } /** - * Write the specified characters from an array. - * @param chr the characters to write - * @param st The start offset - * @param end The number of characters to write + * Writes the specified characters from an array. + * @param cbuf the characters to write + * @param off The start offset + * @param len The number of characters to write * @throws IOException if an I/O error occurs */ @Override - public void write(final char[] chr, final int st, final int end) throws IOException { - out.write(chr, st, end); + public void write(final char[] cbuf, final int off, final int len) throws IOException { + out.write(cbuf, off, len); } /** - * Write the characters from a string. + * Writes the characters from a string. * @param str the string to write * @throws IOException if an I/O error occurs */ @@ -335,19 +335,19 @@ public class LockableFileWriter extends Writer { } /** - * Write the specified characters from a string. + * Writes the specified characters from a string. * @param str the string to write - * @param st The start offset - * @param end The number of characters to write + * @param off The start offset + * @param len The number of characters to write * @throws IOException if an I/O error occurs */ @Override - public void write(final String str, final int st, final int end) throws IOException { - out.write(str, st, end); + public void write(final String str, final int off, final int len) throws IOException { + out.write(str, off, len); } /** - * Flush the stream. + * Flushes the stream. * @throws IOException if an I/O error occurs */ @Override