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


The following commit(s) were added to refs/heads/master by this push:
     new 401d173  [IO-669] Fix code smells; fix typos (#115)
401d173 is described below

commit 401d17349e7ec52d8fa866c35efd24103f332c29
Author: XenoAmess <[email protected]>
AuthorDate: Sun May 31 20:11:24 2020 +0800

    [IO-669] Fix code smells; fix typos (#115)
    
    * fix code smells
    
    * fix typos
    
    * l to L
    
    * use Arrays.fill
    
    * revert deleting boxing
---
 src/main/java/org/apache/commons/io/ByteOrderParser.java |  2 +-
 .../java/org/apache/commons/io/IOIndexedException.java   |  2 +-
 src/main/java/org/apache/commons/io/IOUtils.java         |  4 ++--
 .../java/org/apache/commons/io/TaggedIOException.java    |  4 ++--
 src/main/java/org/apache/commons/io/file/PathUtils.java  |  2 +-
 .../apache/commons/io/input/CharSequenceInputStream.java |  2 +-
 src/main/java/org/apache/commons/io/input/Tailer.java    |  2 +-
 src/main/java/org/apache/commons/io/input/TeeReader.java |  2 +-
 .../commons/io/output/AbstractByteArrayOutputStream.java |  4 ++--
 .../commons/io/output/DeferredFileOutputStream.java      |  2 +-
 .../apache/commons/io/output/FilterCollectionWriter.java |  2 +-
 .../apache/commons/io/file/CleaningPathVisitorTest.java  |  2 +-
 .../apache/commons/io/file/CopyDirectoryVisitorTest.java |  2 +-
 .../apache/commons/io/file/CountingPathVisitorTest.java  |  2 +-
 .../apache/commons/io/file/DeletingPathVisitorTest.java  |  2 +-
 .../commons/io/file/PathUtilsCleanDirectoryTest.java     |  2 +-
 .../apache/commons/io/file/PathUtilsCountingTest.java    |  2 +-
 .../commons/io/file/PathUtilsDeleteDirectoryTest.java    |  2 +-
 .../apache/commons/io/filefilter/FileFilterTestCase.java |  4 ++--
 .../org/apache/commons/io/input/BoundedReaderTest.java   |  9 +++------
 .../org/apache/commons/io/input/NullInputStreamTest.java |  2 +-
 .../io/input/buffer/CircularBufferInputStreamTest.java   |  2 +-
 .../commons/io/output/FileWriterWithEncodingTest.java    | 16 ++++++++--------
 .../apache/commons/io/output/LockableFileWriterTest.java |  4 ++--
 .../org/apache/commons/io/output/ProxyWriterTest.java    |  2 +-
 .../serialization/ValidatingObjectInputStreamTest.java   |  2 +-
 26 files changed, 40 insertions(+), 43 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/ByteOrderParser.java 
b/src/main/java/org/apache/commons/io/ByteOrderParser.java
index ee47469..a0124c0 100644
--- a/src/main/java/org/apache/commons/io/ByteOrderParser.java
+++ b/src/main/java/org/apache/commons/io/ByteOrderParser.java
@@ -59,7 +59,7 @@ public final class ByteOrderParser {
         if (ByteOrder.LITTLE_ENDIAN.toString().equals(value)) {
             return ByteOrder.LITTLE_ENDIAN;
         }
-        throw new IllegalArgumentException("Unsupported byte order setting: " 
+ value + ", expeced one of " + ByteOrder.LITTLE_ENDIAN +
+        throw new IllegalArgumentException("Unsupported byte order setting: " 
+ value + ", expected one of " + ByteOrder.LITTLE_ENDIAN +
                  ", " + ByteOrder.BIG_ENDIAN);
     }
 
diff --git a/src/main/java/org/apache/commons/io/IOIndexedException.java 
b/src/main/java/org/apache/commons/io/IOIndexedException.java
index 3f1dc75..ce45521 100644
--- a/src/main/java/org/apache/commons/io/IOIndexedException.java
+++ b/src/main/java/org/apache/commons/io/IOIndexedException.java
@@ -41,7 +41,7 @@ public class IOIndexedException extends IOException {
     }
 
     /**
-     * Converts input to a suitable Stirng for exception message.
+     * Converts input to a suitable String for exception message.
      *
      * @param index An index into a source collection.
      * @param cause A cause.
diff --git a/src/main/java/org/apache/commons/io/IOUtils.java 
b/src/main/java/org/apache/commons/io/IOUtils.java
index 75c3b10..55c2cfd 100644
--- a/src/main/java/org/apache/commons/io/IOUtils.java
+++ b/src/main/java/org/apache/commons/io/IOUtils.java
@@ -882,7 +882,7 @@ public class IOUtils {
      *
      * @param input the <code>InputStream</code> to read from
      * @param output the <code>Writer</code> to write to
-     * @param inputCharset the charser to use for the input stream, null means 
platform default
+     * @param inputCharset the charset to use for the input stream, null means 
platform default
      * @throws NullPointerException if the input or output is null
      * @throws IOException          if an I/O error occurs
      * @since 2.3
@@ -2893,7 +2893,7 @@ public class IOUtils {
      * @param data the char array to write, do not modify during output,
      * null ignored
      * @param output the <code>OutputStream</code> to write to
-     * @param charset the chartset to use, null means platform default
+     * @param charset the charset to use, null means platform default
      * @throws NullPointerException if output is null
      * @throws IOException          if an I/O error occurs
      * @since 2.3
diff --git a/src/main/java/org/apache/commons/io/TaggedIOException.java 
b/src/main/java/org/apache/commons/io/TaggedIOException.java
index 5c6f0f4..65a5599 100644
--- a/src/main/java/org/apache/commons/io/TaggedIOException.java
+++ b/src/main/java/org/apache/commons/io/TaggedIOException.java
@@ -49,7 +49,7 @@ public class TaggedIOException extends IOExceptionWithCause {
      * try {
      *     ...;
      * } catch (Throwable t) {
-     *     if (TaggedIOExcepton.isTaggedWith(t, tag)) {
+     *     if (TaggedIOException.isTaggedWith(t, tag)) {
      *         // special processing for tagged exception
      *     } else {
      *         // handling of other kinds of exceptions
@@ -81,7 +81,7 @@ public class TaggedIOException extends IOExceptionWithCause {
      * try {
      *     ...;
      * } catch (Throwable t) {
-     *     TaggedIOExcepton.throwCauseIfTagged(t, tag);
+     *     TaggedIOException.throwCauseIfTagged(t, tag);
      *     // handle other kinds of exceptions
      * }
      * </pre>
diff --git a/src/main/java/org/apache/commons/io/file/PathUtils.java 
b/src/main/java/org/apache/commons/io/file/PathUtils.java
index 03ee2ca..6a586c0 100644
--- a/src/main/java/org/apache/commons/io/file/PathUtils.java
+++ b/src/main/java/org/apache/commons/io/file/PathUtils.java
@@ -341,7 +341,7 @@ public final class PathUtils {
                     return false;
                 }
             } else {
-                throw new IllegalStateException(String.format("Unexpected 
mismatch."));
+                throw new IllegalStateException("Unexpected mismatch.");
             }
         }
         return true;
diff --git 
a/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java 
b/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java
index 23d9f3f..eb46594 100644
--- a/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/CharSequenceInputStream.java
@@ -252,7 +252,7 @@ public class CharSequenceInputStream extends InputStream {
                 }
             }
             if (this.cbuf.position() != this.mark_cbuf) {
-                throw new IllegalStateException("Unexpected CharBuffer 
postion: actual=" + cbuf.position() + " " +
+                throw new IllegalStateException("Unexpected CharBuffer 
position: actual=" + cbuf.position() + " " +
                         "expected=" + this.mark_cbuf);
             }
             this.bbuf.position(this.mark_bbuf);
diff --git a/src/main/java/org/apache/commons/io/input/Tailer.java 
b/src/main/java/org/apache/commons/io/input/Tailer.java
index 0c2811f..389a3e9 100644
--- a/src/main/java/org/apache/commons/io/input/Tailer.java
+++ b/src/main/java/org/apache/commons/io/input/Tailer.java
@@ -130,7 +130,7 @@ public class Tailer implements Runnable {
     /**
      * Buffer on top of RandomAccessFile.
      */
-    private final byte inbuf[];
+    private final byte[] inbuf;
 
     /**
      * The file which will be tailed.
diff --git a/src/main/java/org/apache/commons/io/input/TeeReader.java 
b/src/main/java/org/apache/commons/io/input/TeeReader.java
index 827f062..354cac9 100644
--- a/src/main/java/org/apache/commons/io/input/TeeReader.java
+++ b/src/main/java/org/apache/commons/io/input/TeeReader.java
@@ -90,7 +90,7 @@ public class TeeReader extends ProxyReader {
     }
 
     /**
-     * Reads a single chracter from the proxied reader and writes it to the 
associated writer.
+     * Reads a single character from the proxied reader and writes it to the 
associated writer.
      *
      * @return next character from the reader, or -1 if the reader has ended
      * @throws IOException if the reader could not be read (or written)
diff --git 
a/src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java 
b/src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java
index 3f88c85..243b527 100644
--- 
a/src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java
+++ 
b/src/main/java/org/apache/commons/io/output/AbstractByteArrayOutputStream.java
@@ -339,7 +339,7 @@ public abstract class AbstractByteArrayOutputStream extends 
OutputStream {
          *
          * @return the InputStream subclass.
          */
-        T construct(final byte buf[], final int offset, final int length);
+        T construct(final byte[] buf, final int offset, final int length);
     }
 
     /**
@@ -363,7 +363,7 @@ public abstract class AbstractByteArrayOutputStream extends 
OutputStream {
         if (remaining == 0) {
             return EMPTY_BYTE_ARRAY;
         }
-        final byte newbuf[] = new byte[remaining];
+        final byte[] newbuf = new byte[remaining];
         int pos = 0;
         for (final byte[] buf : buffers) {
             final int c = Math.min(buf.length, remaining);
diff --git 
a/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java 
b/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java
index b60c715..6ceeacc 100644
--- a/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java
+++ b/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java
@@ -308,7 +308,7 @@ public class DeferredFileOutputStream
     public void writeTo(final OutputStream out) throws IOException
     {
         // we may only need to check if this is closed if we are working with 
a file
-        // but we should force the habit of closing wether we are working with
+        // but we should force the habit of closing whether we are working with
         // a file or memory.
         if (!closed) {
             throw new IOException("Stream not closed");
diff --git 
a/src/main/java/org/apache/commons/io/output/FilterCollectionWriter.java 
b/src/main/java/org/apache/commons/io/output/FilterCollectionWriter.java
index 2bdb607..acf1291 100644
--- a/src/main/java/org/apache/commons/io/output/FilterCollectionWriter.java
+++ b/src/main/java/org/apache/commons/io/output/FilterCollectionWriter.java
@@ -189,7 +189,7 @@ public class FilterCollectionWriter extends Writer {
      * @exception IOException If an I/O error occurs
      */
     @Override
-    public void write(final char cbuf[], final int off, final int len) throws 
IOException {
+    public void write(final char[] cbuf, final int off, final int len) throws 
IOException {
         final List<Exception> causeList = new ArrayList<>();
         int i = 0;
         for (final Writer w : writers) {
diff --git 
a/src/test/java/org/apache/commons/io/file/CleaningPathVisitorTest.java 
b/src/test/java/org/apache/commons/io/file/CleaningPathVisitorTest.java
index 1bedc41..a033fa0 100644
--- a/src/test/java/org/apache/commons/io/file/CleaningPathVisitorTest.java
+++ b/src/test/java/org/apache/commons/io/file/CleaningPathVisitorTest.java
@@ -113,7 +113,7 @@ public class CleaningPathVisitorTest extends TestArguments {
     }
 
     /**
-     * Tests a directory with two subdirectorys, each containing one file of 
size 1.
+     * Tests a directory with two subdirectories, each containing one file of 
size 1.
      */
     @ParameterizedTest
     @MethodSource("cleaningPathVisitors")
diff --git 
a/src/test/java/org/apache/commons/io/file/CopyDirectoryVisitorTest.java 
b/src/test/java/org/apache/commons/io/file/CopyDirectoryVisitorTest.java
index 16fdb29..9ecc900 100644
--- a/src/test/java/org/apache/commons/io/file/CopyDirectoryVisitorTest.java
+++ b/src/test/java/org/apache/commons/io/file/CopyDirectoryVisitorTest.java
@@ -88,7 +88,7 @@ public class CopyDirectoryVisitorTest extends TestArguments {
     }
 
     /**
-     * Tests a directory with two subdirectorys, each containing one file of 
size 1.
+     * Tests a directory with two subdirectories, each containing one file of 
size 1.
      */
     @ParameterizedTest
     @MethodSource("pathCounters")
diff --git 
a/src/test/java/org/apache/commons/io/file/CountingPathVisitorTest.java 
b/src/test/java/org/apache/commons/io/file/CountingPathVisitorTest.java
index f8078b6..5c853ac 100644
--- a/src/test/java/org/apache/commons/io/file/CountingPathVisitorTest.java
+++ b/src/test/java/org/apache/commons/io/file/CountingPathVisitorTest.java
@@ -70,7 +70,7 @@ public class CountingPathVisitorTest extends TestArguments {
     }
 
     /**
-     * Tests a directory with two subdirectorys, each containing one file of 
size 1.
+     * Tests a directory with two subdirectories, each containing one file of 
size 1.
      */
     @ParameterizedTest
     @MethodSource("countingPathVisitors")
diff --git 
a/src/test/java/org/apache/commons/io/file/DeletingPathVisitorTest.java 
b/src/test/java/org/apache/commons/io/file/DeletingPathVisitorTest.java
index 4db3881..c821165 100644
--- a/src/test/java/org/apache/commons/io/file/DeletingPathVisitorTest.java
+++ b/src/test/java/org/apache/commons/io/file/DeletingPathVisitorTest.java
@@ -118,7 +118,7 @@ public class DeletingPathVisitorTest extends TestArguments {
     }
 
     /**
-     * Tests a directory with two subdirectorys, each containing one file of 
size 1.
+     * Tests a directory with two subdirectories, each containing one file of 
size 1.
      */
     @ParameterizedTest
     @MethodSource("deletingPathVisitors")
diff --git 
a/src/test/java/org/apache/commons/io/file/PathUtilsCleanDirectoryTest.java 
b/src/test/java/org/apache/commons/io/file/PathUtilsCleanDirectoryTest.java
index 41f86d4..351a53b 100644
--- a/src/test/java/org/apache/commons/io/file/PathUtilsCleanDirectoryTest.java
+++ b/src/test/java/org/apache/commons/io/file/PathUtilsCleanDirectoryTest.java
@@ -70,7 +70,7 @@ public class PathUtilsCleanDirectoryTest {
     }
 
     /**
-     * Tests a directory with two subdirectorys, each containing one file of 
size 1.
+     * Tests a directory with two subdirectories, each containing one file of 
size 1.
      */
     @Test
     public void testCleanDirectory2FileSize2() throws IOException {
diff --git 
a/src/test/java/org/apache/commons/io/file/PathUtilsCountingTest.java 
b/src/test/java/org/apache/commons/io/file/PathUtilsCountingTest.java
index e0d1939..74c7125 100644
--- a/src/test/java/org/apache/commons/io/file/PathUtilsCountingTest.java
+++ b/src/test/java/org/apache/commons/io/file/PathUtilsCountingTest.java
@@ -67,7 +67,7 @@ public class PathUtilsCountingTest {
     }
 
     /**
-     * Tests a directory with two subdirectorys, each containing one file of 
size 1.
+     * Tests a directory with two subdirectories, each containing one file of 
size 1.
      */
     @Test
     public void testCountFolders2FileSize2() throws IOException {
diff --git 
a/src/test/java/org/apache/commons/io/file/PathUtilsDeleteDirectoryTest.java 
b/src/test/java/org/apache/commons/io/file/PathUtilsDeleteDirectoryTest.java
index 76b0268..8caf5ec 100644
--- a/src/test/java/org/apache/commons/io/file/PathUtilsDeleteDirectoryTest.java
+++ b/src/test/java/org/apache/commons/io/file/PathUtilsDeleteDirectoryTest.java
@@ -71,7 +71,7 @@ public class PathUtilsDeleteDirectoryTest {
     }
 
     /**
-     * Tests a directory with two subdirectorys, each containing one file of 
size 1.
+     * Tests a directory with two subdirectories, each containing one file of 
size 1.
      */
     @Test
     public void testDeleteDirectory2FileSize2() throws IOException {
diff --git 
a/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java 
b/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
index 4dff42b..c500b77 100644
--- a/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
+++ b/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
@@ -1406,7 +1406,7 @@ public class FileFilterTestCase {
 
         final IOFileFilter filter = FileFilterUtils.trueFileFilter();
         try {
-            FileFilterUtils.filterList(filter, Arrays.asList((File) null));
+            FileFilterUtils.filterList(filter, 
Collections.singletonList((File) null));
             fail();
         } catch (final IllegalArgumentException iae) {
             // Test passes, exception thrown for list containing null
@@ -1467,7 +1467,7 @@ public class FileFilterTestCase {
 
         final IOFileFilter filter = FileFilterUtils.trueFileFilter();
         try {
-            FileFilterUtils.filterSet(filter, new 
HashSet<>(Arrays.asList((File) null)));
+            FileFilterUtils.filterSet(filter, new 
HashSet<>(Collections.singletonList((File) null)));
             fail();
         } catch (final IllegalArgumentException iae) {
             // Test passes, exception thrown for set containing null
diff --git a/src/test/java/org/apache/commons/io/input/BoundedReaderTest.java 
b/src/test/java/org/apache/commons/io/input/BoundedReaderTest.java
index c78f035..9f806fb 100644
--- a/src/test/java/org/apache/commons/io/input/BoundedReaderTest.java
+++ b/src/test/java/org/apache/commons/io/input/BoundedReaderTest.java
@@ -33,6 +33,7 @@ import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.time.Duration;
+import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.commons.io.FileUtils;
@@ -70,9 +71,7 @@ public class BoundedReaderTest {
     public void readMulti() throws IOException {
         try (final BoundedReader mr = new BoundedReader(sr, 3)) {
             final char[] cbuf = new char[4];
-            for (int i = 0; i < cbuf.length; i++) {
-                cbuf[i] = 'X';
-            }
+            Arrays.fill(cbuf, 'X');
             final int read = mr.read(cbuf, 0, 4);
             assertEquals(3, read);
             assertEquals('0', cbuf[0]);
@@ -86,9 +85,7 @@ public class BoundedReaderTest {
     public void readMultiWithOffset() throws IOException {
         try (final BoundedReader mr = new BoundedReader(sr, 3)) {
             final char[] cbuf = new char[4];
-            for (int i = 0; i < cbuf.length; i++) {
-                cbuf[i] = 'X';
-            }
+            Arrays.fill(cbuf, 'X');
             final int read = mr.read(cbuf, 1, 2);
             assertEquals(2, read);
             assertEquals('X', cbuf[0]);
diff --git a/src/test/java/org/apache/commons/io/input/NullInputStreamTest.java 
b/src/test/java/org/apache/commons/io/input/NullInputStreamTest.java
index eaca82b..88e7095 100644
--- a/src/test/java/org/apache/commons/io/input/NullInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/NullInputStreamTest.java
@@ -43,7 +43,7 @@ public class NullInputStreamTest {
         }
         assertEquals(0, input.available(), "Available after contents all 
read");
 
-        // Check availbale is zero after End of file
+        // Check availabale is zero after End of file
         assertEquals(-1, input.read(), "End of File");
         assertEquals(0, input.available(), "Available after End of File");
 
diff --git 
a/src/test/java/org/apache/commons/io/input/buffer/CircularBufferInputStreamTest.java
 
b/src/test/java/org/apache/commons/io/input/buffer/CircularBufferInputStreamTest.java
index 4d374f4..2022cba 100644
--- 
a/src/test/java/org/apache/commons/io/input/buffer/CircularBufferInputStreamTest.java
+++ 
b/src/test/java/org/apache/commons/io/input/buffer/CircularBufferInputStreamTest.java
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
 
 
 public class CircularBufferInputStreamTest {
-       private final Random rnd = new Random(1530960934483l); // 
System.currentTimeMillis(), when this test was written.
+       private final Random rnd = new Random(1530960934483L); // 
System.currentTimeMillis(), when this test was written.
                                                               // Always using 
the same seed should ensure a reproducable test.
 
        @Test
diff --git 
a/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java 
b/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
index c7773b1..b5293e6 100644
--- a/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
+++ b/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
@@ -69,37 +69,37 @@ public class FileWriterWithEncodingTest {
     //-----------------------------------------------------------------------
     @Test
     public void sameEncoding_string_constructor() throws Exception {
-        succesfulRun(new FileWriterWithEncoding(file2, defaultEncoding));
+        successfulRun(new FileWriterWithEncoding(file2, defaultEncoding));
     }
 
     @Test
     public void sameEncoding_string_string_constructor() throws Exception {
-        succesfulRun(new FileWriterWithEncoding(file2.getPath(), 
defaultEncoding));
+        successfulRun(new FileWriterWithEncoding(file2.getPath(), 
defaultEncoding));
     }
 
     @Test
     public void sameEncoding_Charset_constructor() throws Exception {
-        succesfulRun(new FileWriterWithEncoding(file2, 
Charset.defaultCharset()));
+        successfulRun(new FileWriterWithEncoding(file2, 
Charset.defaultCharset()));
     }
 
     @Test
     public void sameEncoding_string_Charset_constructor() throws Exception {
-        succesfulRun(new FileWriterWithEncoding(file2.getPath(), 
Charset.defaultCharset()));
+        successfulRun(new FileWriterWithEncoding(file2.getPath(), 
Charset.defaultCharset()));
     }
 
     @Test
     public void sameEncoding_CharsetEncoder_constructor() throws Exception {
         final CharsetEncoder enc = Charset.defaultCharset().newEncoder();
-        succesfulRun(new FileWriterWithEncoding(file2, enc));
+        successfulRun(new FileWriterWithEncoding(file2, enc));
     }
 
     @Test
     public void sameEncoding_string_CharsetEncoder_constructor() throws 
Exception {
         final CharsetEncoder enc = Charset.defaultCharset().newEncoder();
-        succesfulRun(new FileWriterWithEncoding(file2.getPath(), enc));
+        successfulRun(new FileWriterWithEncoding(file2.getPath(), enc));
     }
 
-    private void succesfulRun(final FileWriterWithEncoding fw21) throws 
Exception {
+    private void successfulRun(final FileWriterWithEncoding fw21) throws 
Exception {
         FileWriter fw1 = null;
         FileWriterWithEncoding fw2 = null;
         try {
@@ -248,7 +248,7 @@ public class FileWriterWithEncodingTest {
     @Test
     public void sameEncoding_null_Charset_constructor() throws Exception {
         try {
-            succesfulRun(new FileWriterWithEncoding(file2, (Charset) null));
+            successfulRun(new FileWriterWithEncoding(file2, (Charset) null));
             fail();
         } catch (final NullPointerException ignore) {
 
diff --git 
a/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java 
b/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
index 94374b4..70019b3 100644
--- a/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
+++ b/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
@@ -58,7 +58,7 @@ public class LockableFileWriterTest {
     //-----------------------------------------------------------------------
     @Test public void testFileLocked() throws IOException {
 
-        // open a valid locakable writer
+        // open a valid lockable writer
         try (LockableFileWriter lfw1 = new LockableFileWriter(file)) {
             assertTrue(file.exists());
             assertTrue(lockFile.exists());
@@ -91,7 +91,7 @@ public class LockableFileWriterTest {
 
     //-----------------------------------------------------------------------
     @Test public void testAlternateLockDir() throws IOException {
-        // open a valid locakable writer
+        // open a valid lockable writer
         try (LockableFileWriter lfw1 = new LockableFileWriter(file, "UTF-8" 
,true, altLockDir.getAbsolutePath())){
             assertTrue(file.exists());
             assertTrue(altLockFile.exists());
diff --git a/src/test/java/org/apache/commons/io/output/ProxyWriterTest.java 
b/src/test/java/org/apache/commons/io/output/ProxyWriterTest.java
index a2d1a41..d77b787 100644
--- a/src/test/java/org/apache/commons/io/output/ProxyWriterTest.java
+++ b/src/test/java/org/apache/commons/io/output/ProxyWriterTest.java
@@ -123,7 +123,7 @@ public class ProxyWriterTest {
     }
 
     @Test
-    public void nullCharSequencec() throws Exception {
+    public void nullCharSequence() throws Exception {
         try (final ProxyWriter proxy = new 
ProxyWriter(NullWriter.NULL_WRITER)) {
             proxy.append(null);
             proxy.close();
diff --git 
a/src/test/java/org/apache/commons/io/serialization/ValidatingObjectInputStreamTest.java
 
b/src/test/java/org/apache/commons/io/serialization/ValidatingObjectInputStreamTest.java
index 58c5a0b..8e48120 100644
--- 
a/src/test/java/org/apache/commons/io/serialization/ValidatingObjectInputStreamTest.java
+++ 
b/src/test/java/org/apache/commons/io/serialization/ValidatingObjectInputStreamTest.java
@@ -40,7 +40,7 @@ public class ValidatingObjectInputStreamTest extends 
ClosingBase {
     private MockSerializedClass testObject;
     private InputStream testStream;
 
-    static private final ClassNameMatcher ALWAYS_TRUE = className -> true;
+    private static final ClassNameMatcher ALWAYS_TRUE = className -> true;
 
     @Override
     @BeforeEach

Reply via email to